DO i = 1, n
a_vec(i) = Ens_a_vec(i,K)
a_str = a_vec(i)
a_vec(i) = a_str
Ens_a_vec(i,K) = a_vec(i)
Regal wrote:Interesting idea, thanks! I suppose I should do the same with a_str and the real variables which are in equivalence with it, right?
Also, I have inside the loop, along with a_str, a_vec(i) and Ens_a_vec(i,K), other variables b_str and b_vec(i) for which there is no Ens_b_vec(i,K). However the same initialization and restoring sequences occur as in the case of a_str and a_vec(i). For example, before the call to SUBR(K) we have a_str = a_vec(i), and after that a_vec(i) = a_str. What will happen with them if more than one thread share the work? Will all the threads automatically use the same value for these variables?
Regal wrote:I am wondering if declaring all these variables as private in the beginning of the parallel section would solve the problem
Users browsing this forum: Google [Bot] and 13 guests