Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Thread-Safe Fortran DLLs

Lucio__Juan
Beginner
113 Views

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
0 Replies
Reply