I'm a user of the fortran 90 language and new to OpenMP.
I want to call user created functions and subroutines inside OpenMP parallel regions as follows
- Code: Select all
MY FUN = MYFUNCTION(X)
!OMP END PARALLEL
where MYSUBROUTINE and MYFUNCTION are serial procedures. My questions are
1. Does the fortran compiler create a copy of MYSUBROUTINE and MYFUNCTION for
each processor being used?
2. Do I need to explicitly indicate in MYSUBROUTINE and MYFUNCTION definitions which variables need to be thread private?
I have read the LLNL OpenMP tutorial but the answer to these questions is not yet clear to me.