Jannis Teunissen

User Tools

Site Tools

Internal procedures & OpenMP in Fortran

Does the following (pseudo)code work?

program test
subroutine a()
  !$omp do
  do i = 1, N
    call b()
  end do
  !$omp end do
end subroutine a
subroutine b()
end subroutine b
end program test

My experience with GFortran and ifort is that this can *sometimes* work, but often does not. Passing an internal procedures as an arguments inside an parallel loop is probably even less likely to work.

Page Tools