Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Make legacy code generally thread-safe (not just for OpenMP multithreading)

$
0
0

Hi,

I've just created a topic called "threadprivate common-block for non-openmp thread".

But AFIAK fact is:

There are billions of LOC of legacy FORTRAN libraries out there that use static variables (common-blocks, safe-statements,...). Those libraries are nowadays called from C, C++, managed .net or even Java code, ... (and this is only the Windows world), in Applications that usually run on multiple threads (e.g. as server-applications).

When I made my own FORTRAN code thread-safe for OpenMP, I really liked the threadprivate statement for common blocks. But it has at least two drawbacks: first, it has to be added to every common-block and global module variable, and second (and that's a big drawback), it works ONLY for OpenMP-threads.

Having a simple compiler switch, making all static variables thread private and allocating memory on thread attach, would be of great help. I'd really like to see intel addressing this problem.

best regards

Tobias


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>