×
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

Abaqus python scripting: How to remove / release odb & frames objects from memory?

Abaqus python scripting: How to remove / release odb & frames objects from memory?

Abaqus python scripting: How to remove / release odb & frames objects from memory?

(OP)
I have a odb file which is ~1.6Gb in size. It contains 1 step with 7 frames. I am writing a GUI plug-in which needs to loop through all the steps and all the frames. A cut down version of the code I use to do this is as follows:


odb = openOdb(path=self.owner.odbNameKw.getValue())

nstep = len(odb.steps)

for i in range(nstep):

stepKey = odb.steps.keys()[i]

nframes = len(odb.steps[stepKey].frames)

for j in range(nframes):

currentFrame = odb.steps[stepKey].frames[j]

odb.close()


A the end of the procedure, there is an additional ~1.6Gb in memory. Calling odb.close() does not release it. I have tried various del statements and also garbage collection, none of which work. The memory increases each time the 'currentFrame = ' line is executed. I have also tried using 'del currentFrame', but this doesn't work either.

Any help much appreciated, as I will need to open files upto 10Gb eventually.

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