Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing variables between different subroutines

Status
Not open for further replies.

abaqususer1981

Structural
Jul 18, 2013
14
Hi All!

My particular problem is to run three different subroutines that need to share variables between them using cpus=2.

I've tried using SAVE statement but it does not work with multiple cpus. I also tried writing and reading from temporary txt files but this solution is not general. In simple models it works, for larger models it does not work. I don't get an error but the execution just hangs at the beginning of the analysis and nothing happens.

There must be a way of sharing variables between different subroutines and running them using more than one cpu core. Any ideas? Thanks

AJ
 
Replies continue below

Recommended for you

Just to add a note to my answer:

My particular problem is to run three different subroutines that need to share global variables between them along the analysis using cpus=2.

For instance: In the beginning of the analysis KW = 0, each time the UEL is called KW = KW + 1 until a new increment is started where KW = 0 again, and so on....
 
Have you looked at, or tried, UFIELD or USDFLD?

Han primo incensus
 
@DanStro: For the intended purposes no I haven't. I'm struggling to see how they could become useful for changing the values of internal, but globally available, UEL variables used to check if we are at the first iteration of a given increment and update their value based on a boolean loop or to acumulate and register results in variables for output purposes....

To add to my question, I'm struggling to use multicores eve if the UEL is stripped from any write request or even multiple subroutines. Using only my UEL the convergence is totally dependent on the number of cpus I use. I can get the same level of convergence if I use 1 or 2 cpus but for 4 or 8 abaqus aborts in the beginning.... If I introduce write requests to the .dat file then the problems extend to cpus=2.....

Does anyone have experience of using subroutines and multiple cores? Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor