DjungelJarl DjungelJarl - 2 months ago 8
Python Question

Compile user subroutine only once when running consecutive jobs in Abaqus

I have a script written in Python which calibrates material parameters based on the output of the last job, that is, it runs many jobs in Abaqus consecutively until an error is small enough.

I use a Fortran subroutine which compiles before each job.

The problem is that for each job I submit, the user subroutine compiles. Even though the input parameters are different from the last job the user subroutine does not have to be compiled again. Compilation of the subroutine takes about 80% of the time of running a job.

How can I specify to only compile the user subroutine ONCE and use it for all consecutive runs?

The following is snippets of relevant code written in Python. I execute my script by typing

abaqus cae

in a terminal. The code uses the Abaqus scripting interface.

Creating a job:

mdb.Job(name=self.jobName, model='Model-1', description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF,
scratch='', resultsFormat=ODB, multiprocessingMode=DEFAULT, numCpus=1,

Submit and wait for job completion:[self.jobName].submit(consistencyChecking=OFF)[self.jobName].waitForCompletion()

This code is run each time I run a consecutive job with data from the previous run.

The compiler is Intel 64 Fortran Compiler XE, Version Build 20140723.


By entering

module add abaqus
module add intel
module add gcc

I then was allowed to enter

abaqus make library=usub.f

which would compile the subroutine.