You are here
If common block can be used in UMAT for parallel computing
Thu, 2008-10-23 04:15 - Wang Guofeng
Hello everyone
I wrote some codes with umat recently . They can work well with single CPU. However, the results become very bad for several CPUs.
I define a matrix with COMMON BLOCK and it seems that COMMON BLOCK can not be used for parallel computing. Are there any ways to resolve this problem?
I am not familiar with fortran.Someone told me that the matrix should be defined by MODULE. I don't know about this.
Please give some helps to me
regards,
Wang
»
- Wang Guofeng's blog
- Log in or register to post comments
- 8532 reads
Comments
Thread safe subroutine
Dear Wang,
I fear that the sub-routine should be written so it is "thread-safe" (http://en.wikipedia.org/wiki/Thread_safety). I cite (abq manual):
"User subroutines can be used when running jobs in
parallel. However, user subroutines and any subroutines called by them
must be thread safe. This precludes the use of common blocks, data
statements, and save statements. Calling subroutines that are not thread
safe will result in unpredictable behaviour of the executable."
Moreover: "User subroutines can be used when running jobs in parallel. However,
the use of common block statements in the user subroutines or in
subroutines called by the user subroutines must be avoided since it will
result in unpredictable behaviour of the executable."
I'm stuck on the same problem (as I use the command SAVE in the subroutine) but I do not have enough programming competence. Try to ask a script expert!
Good luck,
Alessandro Stocchi