- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good morning.
I am trying to parallelize my code through OpenMP.
This code is chock full of variables contained in modules shared with each other via the USE command.
Reading on the forum, I realized that I should use the Threadprivate command and put the variable name in round brackets.
However, this system is impractical, because there are a lot of variables.
Is there a way to use a copy of the whole module in each thread, without having to specify one variable at a time?
Each thread does not need to exchange the module variables with another (also because it would not be parallelizable), but each thread needs all the variables inside the modules
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Place those variables in a user defined type, then instantiate a single variable of that type attributed with threadprivate. For example, you could name the variable "tls" and prefix the references to those variables with "tls%", e.g. tls%ABC
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page