Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

openMP - Handling global variables in fortran

$
0
0

Hi,
I am trying to parallelize a code that is already written and contains close to 102 subroutines in the function I am trying to parallelize. In the process I saw that there were many global variables that each subroutine access and this is not good for parallel programming.

I have two questions:
1 - Under such scenarios, what is the best way to fix this? Do I make the variables an array so that it can be a function of the thread? Its quite tideous though and I am looking for some good work around
2 - Is there any way I can detect global variables that my thread is trying to access without reverse engineering the code a lot ?

- Ajay


Viewing all articles
Browse latest Browse all 1424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>