Hi, guys. I'm a new hand of openmp. I encounter some problems related to deallocating allocatable array in openmp loop.
The main reason is the array is too large. An example code is following:
program omptest use omp_lib implicit none INTEGER :: I,k,J integer,pointer :: b(:) !$OMP PARALLEL DO PRIVATE(i,b,k) DO I=1,2490000 allocate(b(67214259)) k=OMP_get_thread_num() deallocate(b) END DO !$OMP END PARALLEL DO END PROGRAM
When the maximum bound of i is large, like 2490000, the program will break at deallocate(b)