×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Sharing variables between different subroutines

Sharing variables between different subroutines

Sharing variables between different subroutines

(OP)
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

RE: Sharing variables between different subroutines

(OP)
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....

RE: Sharing variables between different subroutines

Have you looked at, or tried, UFIELD or USDFLD?

Han primo incensus

RE: Sharing variables between different subroutines

(OP)
@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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources