I have an Abaqus/Explicit model which currently uses 3 subroutines: VEXTERNALDB, VUAMP, and VDLOAD. VEXTERNALDB is used to read an externally generated text file and save the values such that they can be read by the other two subroutines.
I would like to add additional complexity to the model, which requires that one of the imported values will now instead be determined internally and vary based on the state of the model in each increment.
I am planning to implement this capability using a module as outlined here. However, due to general ignorance on Fortran/multithreading I am concerned about thread-safety. My questions are as follows:
- Is the same module variable global between all threads, or is it defined on a per thread basis?
- If the variable is shared between threads is a MUTEX on any write command an acceptable solution?
- Would it be better to define the variable as an array and only allow each thread to change a single value in the array?