Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Thread-Safe Fortran DLLs

Hi,

I am new to forum posting so excuse any mistakes.

I have some questions regarding thread-safe Fortran dlls. 

A little context: I have a C++ program that is using OpenMP to make parallel calls to a Fortran dll.

The Fortran dll is made up of legacy code that is not thread-safe because it involves several modules. Since I am a newbie I thought I could easily make the dll thread-safe by adding the OpenMP THREADPRIVATE directive to all the variables in modules.

Module Test
REAL*8 x
!$OMP THREADPRIVATE(x)
End Module Test

After some testing I have seen that this does not work. I was wondering if anyone had advice.

Thanks,

J   

0 Kudos