fortran 90 MODULE in OpenMP

Hi,

i am trying to implement OpenMP in a FORTRAN code.i use MODULE instead of common blocks.How do i define whether the contents of a module are PRIVATE.Even though i have used THREADPRIVATE for the module name and define the variables defined in the module as private, the code is taking them as SHARED.if anybody has any experience in handling MODULE with OpenMP, please let me know the correct way of implementing this

i am trying this on a SUN ultra workstation running on Solaris 10 and Sun Studio 11.

regards

manoj

[551 byte] By [manojtnaira] at [2007-11-27 2:55:48]
# 1

I am pretty sure that the compiler is supposed to issue an error message if you put a module name in the threadprivate directive. At any rate, the standard says that only variables and common blocks can appear there.

If you write your module like this it should work:

module mymod

integer x(100)

integer y(100)

!$omp threadprivate(x,y)

end module mymod

igba at 2007-7-12 3:32:53 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

thanks for your reply.unfortunately the compiler does not issue any warnings if i put a module name in TREADPRIVATE.i am now using the OMP statement inside the MODULE and it is now working.

i use the following version of the compiler:

Sun Fortran 95 8.2 Patch 121020-05 2006/12/08

thanks

regards

manoj

manojtnaira at 2007-7-12 3:32:53 > top of Java-index,Development Tools,Solaris and Linux Development Tools...