- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have run into a problem with OpenMP and libraries that are not compiled
for OpenMP. Unfortunately I have no demonstration of the problem yet, but
I can sketch it:
- The program uses a DO-loop that is OpenMP-enabled and uses a bunch of
subroutines that are not (explicitly) compiled with the OpenMP flag
nor do they use OpenMP-enabled DO-loops.
- These subroutines do use small local arrays to keep track of the
location within arrays that are passed as arguments.
I suspect that these local arrays are not taken from the stack and that therefore
a subroutine that is run by two threads at a time will not function properly.
(In my program the symptom is an access violation from time to time, not
reproducible.)
Am I correct in assuming that to use OpenMP in the program, all code that
gets possibly executed within a multithreaded part must be compiled with
OpenMP enabled?
Regards,
Arjen
I have run into a problem with OpenMP and libraries that are not compiled
for OpenMP. Unfortunately I have no demonstration of the problem yet, but
I can sketch it:
- The program uses a DO-loop that is OpenMP-enabled and uses a bunch of
subroutines that are not (explicitly) compiled with the OpenMP flag
nor do they use OpenMP-enabled DO-loops.
- These subroutines do use small local arrays to keep track of the
location within arrays that are passed as arguments.
I suspect that these local arrays are not taken from the stack and that therefore
a subroutine that is run by two threads at a time will not function properly.
(In my program the symptom is an access violation from time to time, not
reproducible.)
Am I correct in assuming that to use OpenMP in the program, all code that
gets possibly executed within a multithreaded part must be compiled with
OpenMP enabled?
Regards,
Arjen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you would refer to the posts where declaring the procedures RECURSIVE is advocated, you should find the answer confirmed:
In the absence of SAVE declarations, any of the following will have the effect of procedure-private allocation of local arrays:
compiler options -auto, -recursive, -openmp
procedure declaration RECURSIVE
In the absence of SAVE declarations, any of the following will have the effect of procedure-private allocation of local arrays:
compiler options -auto, -recursive, -openmp
procedure declaration RECURSIVE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, that is clear. I will change the compiler options and try again.
Regards,
Arjen
Regards,
Arjen
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