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