- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "parallelization" is introduced by simple OpenMP parallel FOR cycle which is calling one special function for different input data. The problem is, that this special function communicate with rest of the code mostly via COMMON blocks and uses SAVE command.
I am looking for suitable tools and/or general methodology how to find data access conflicts and other potential problems in this case.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your function doesn't contain sufficiently large DO loops to be suitable for parallelization of a DO loop inside the function, its hard to imagine that an automatic tool would fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>The problem is, that this special function communicate with rest of the code mostly via COMMON blocks and uses SAVE command
This will require you to examine the special function to check for conflicts when called from your parallel loop.
Typical problems are the function is an accumulator, e.g. calculating total force. For these types of functions consider using stack local temporaries in the external function loop (assuming function has a loop) then a reduction operator (or critical section or atomic) to form the global accumulation. When the function does not contain a loop and where the calling loop (the parallel loop) performs the accumulation, then use a private accumulation variable or reduction variable.
One potential problem area is local arrays in source files compiled without OpenMP (e.g. library) are subject to being SAVE. Therefore assure that these source files are compiled with the OpenMP option (even when they do not have !$OMP...). Alternately, add RECURSIVE attribute to the subroutine/function, or if you wish the non-portable AUTOMATIC attribute to your local array declarations.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
could you add a simple example of the command line witch proper switches and options?
Thanks ian advance ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page