Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

Compiling OpenMP Fortran programs

Raghu_Reddy
Beginner
294 Views

Suppose I have a FORTRAN file that doesn't have any OpenMP directives, but as a routine that will be called from within OpenMP parallel region.

If is there any difference in compiling the following file with one of these options:

-openmp

-recursive

-auto

If there is a difference, is there any downside to using these in combination (it simplifies some Makefiles).

Thank you

--rr

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
294 Views
I can think of no downside or difference for the code generated for the routine. Be mindful that should the -openmp option reach (be passed through to) the link phase that the OpenMP libraries may be linked in. I assume that your "doesn't have any OpenMP directives" also includes "doesn't call OpenMP library functions" as well. Jim Dempsey
0 Kudos
TimP
Honored Contributor III
294 Views
In addition to what Jim said, declaring the procedure RECURSIVE will make it callable in a parallel region, without depending on those options.
0 Kudos
Reply