- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I sure could use some Thread Local Storage!
I have a few buffers that right now are being passed as parameters down down down level after level. It would be nice to have them as globals instead. But thread-safe globals. Is there any easy way to do this in IVF 9.1 ??
Thanks!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The OpenMP facilitiesof ifort facilitate the use of (thread-safe) TLS for"global" data. (COMMON blocks in pre-f90 code require threadprivate declarations).You have to recognize the contradictions between thread safety and global storage, at least to the extent of complying with OpenMP rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
George,
I have had good luck using the following for some time now.
type
TypeThreadContextSEQUENCE
type
(TypeObject), pointer :: pObjecttype
(TypeTether), pointer :: pTethertype
(TypeFSInput), pointer :: pFSInputend
type TypeThreadContexttype
(TypeThreadContext) :: ThreadContextCOMMON
/CONTEXT/ ThreadContext!$OMP THREADPRIVATE(/CONTEXT/)
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page