https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81205
--- Comment #7 from Pasha <pasha.313 at hotmail dot com> --- (In reply to Harald Anlauf from comment #6) > (In reply to Pasha from comment #5) > > (In reply to Harald Anlauf from comment #4) > > > (In reply to Pasha from comment #2) > > > > This is my main routine for example > > > > . > > > > . > > > > . > > > > !!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(K,jL) > > > > DO k=1,nG3 > > > > DO jL=1,nL2 > > > > j = idx2start + jL > > > > > > Any reason you didn't declare j as private? > > That did not solve the problem as I have other subroutines in main which > > declared all of index number in main program and in subroutines but again > > the code Blocks. Even when I disabled OMP commands in the loop of main > > program, the code get inside the subroutine but again blocks in the loop of > > that subroutines. > > I used ulimit -s 10000000 or ulimit -Hd to increase the capacity of each CPU > > but still get nowhere. > > You're saying your code blocks even without OpenMP? > Then it's not an OpenMP problem. No it works with OpenMp. Actually 60% of code works with OpenMp without having any problems right now. But Please imagine this program Program A . . !$OMP Parallel ...... Do I=1, 100 call B(...) =====> main program End do !$OMP End .... . . end program Subroutine B . . !$OMP Parallel ...... Do I=1, 100 D=..... =====> subroutine End do !$OMP ENd .... end Subroutine B in any subroutines which is called inside of a loop and also that subroutine has one or more loops I faced with this problem. I disabled OMP commands in main program first to check whether the problem was solved but it blocked again so I disabled OMP commands in those subroutines. The program run after that. In the rest of the code OMP works well. But I could not parallel those loops and subroutines. > > Your comments sound your code has a more serious issue that > cannot be understood given the code parts you've shown. > > > > > > > > IF(masque(j,k))THEN > > > > > > > > ! dudx > > > > CALL fvec (nG1,curC(1:nG1,jL,k), difles1C(1:nG1,jL,k)) > > > > CALL tridgn (ff,s1,w1,difles1C(1:nG1,jL,k), nG1,1) > > > > ENDIF > > > > ENDDO > > > > ENDDO > > > > !!$OMP END PARALLEL DO > > > > > > Have you tried some thread-checking tool to debug the code, > > > or cross-checked with another compiler? > > > > Some of my friends suggested to compile the code with ifort, but I do not > > access to that. I asked my supervisor to buy or find it on other lab to > > check it. > > Will you please offer a name of thread-checking tools? can I do it with > > visual studio? or you mean something else? > > I can't say anything about visual whatever. > > I'd recommend valgrind (for memory and thread checking), > or a newer gcc release supporting thread and memory sanitizing. > > With the Intel compiler (you could try an evaluation license) I've > used the tools belonging to the Intel suite for doing the same. They > have a fancy GUI, if that's what you prefer. I will try and will let you now.