- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've got a FORTRAN dll that was made multi-threading-safe for openmp-threads by adding threadprivate-pragmas for all common-blocks.
Now, I'm trying to use this library in a multi-threaded environment, were the thread are NOT openmp threads. Is there any possibility to force allocation of the thread-local-memory for the common blocks and usage of thread-local-memory for those threads?
regards
Tobias
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not that I know of.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Only way how to have some private data of thread is described here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686997%28v=vs.85%29.aspx In this case You should rewrite code to use data structure containing all module data and allocate space for it.
Another possibility (without rewritting your code) is to make copies of Your dll (each thread = one dll with different name) and create different threads with different copy of dll. In this case each dll will have access to its own data.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page