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.