In ourcode, we have many allocatable arrays before parallel do session.
To remove the data dependence, at the present, our code is like this:
allocate(A(M1,N1,number_of_threads))
allocate(B(M2,N2,L2,number_of_threads))
!$OMP parallel do
DO I = 1, II
....
ENDDO
Since ourarrays size is very large and we would like to reduce the memory. If the following is
more efficient in terms of memory usage as well as the performance?
!$OMP parallel do
DO I =1, II
Allocate(A(M1,N1))
Allocate(B(M2,N2,L2))
.....
deallocate(A,B)
ENDDO
Thanks