MarkB wrote:You may be unintentionally sharing some variables between threads: you need to examine you code for cases where more than one thread could access the same shared variables at the same time. Remember that in Fortran, variables declared inside subroutines with the SAVE attribute are shared, as are variables declared in modules or COMMON blocks.
I modified my scripts in Fortran 90, compiled it and run it , but there was a problem happened when using parallel method:forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libpthread.so.0 00007F7863F699CB Unknown Unknown Unknown
libiomp5.so 00007F786449E2A8 Unknown Unknown Unknown
I googled this problem, some said the 'ulimit -s unlimited' in '.bashrc ' file is ok, but after I added it in my .bashrc file ,it won't be help.
can you give me some helpful advice?
PS：I do my parallel method using this declare ahead of my parallel block:
!$OMP PARALLEL DO &
!$OMP DEFAULT(SHARED) &
wherein, varibles in !$OMP PRIVATE
is the temporary intermediate variables in do loop block.