-about the comments preceding OMP directives : I know that I can compile without following the OMP directives; in gfortran, the compiler that I use, I just need to NOT specify the "-fopenmp" option; the only problem then, is that some function calls or subroutines are not recognized by the linker, such as OMP_GET_NUM_PROCS, OMP_GET_NUM_THREADS, OMP_GET_THREAD_NUM and probably OMP_SET_NESTED and OMP_SET_NUM_THREADS but I did not try yet for these two latter ones; anyway, for the three first ones, I just created dummy functions or subroutines in my code, doing nothing, and the linker does not complain any more since it finds them.
But a reason for that, for example in the following code, is that it enables me to choose easyly between different trys during the developpement phase of my work, since I am not yet always sure of the way to best do the things.
- Code: Select all
C$OMP PARALLEL DO SCHEDULE(DYNAMIC)
c C$OMP+PRIVATE(cont, Diml, EID, elem, elemout, nocc, NTHREADS, stot, stotfinal,
c C$OMP+TID, valinter, voltot)
C$OMP+SHARED(Ccvt1, Ccvt2, elem, elemout, FSCVT2, lina)
-Of course that it is useless to request a MASTER construct before any parallel operation, since the execution begins sequentially.
-Excuse me to have posted such a big bunch of code; yesterday thursday, I took a look at the forum from my home, and I noticed that you had underlined happily that I would "select what is important"; I intended to do so when I wrote that, but later I feared to miss anything critical, such as an instruction that has been lying there for so long, and that I have read tens or hundreds of times without thinking any longer that it could have such a critical importance, so I put everything.
Have a good week-end if you read this before monday, or have a good beginning of week if we are already on monday morning,