UlrichH
UlrichH

Reputation: 83

Launch Abaqus job from python

I try to launch an Abaqus job from a Python script:

subprocess.call(['/opt/Abaqus/Commands/abq6132', 'job=test.inp'])

The following warning message appears as expected:

Abaqus Warning: The .inp or .sim extension has been removed from the job identifier

also, the .com file is created, and an empty .log file is created. But then nothing else happens, and abaqus pre and standard do not start.

Trying to start other software with subprocess.call() works quite well, e.g. launch Matlab; only Abaqus is not starting as expected. Does Anyone have an idea why it is not working with Abaqus?

Btw, also other possibilities, e.g. subprocess.call(['/opt/Abaqus/Commands/abq6132 job=test.inp'], shell=True) give the same results.

Upvotes: 3

Views: 1963

Answers (1)

UlrichH
UlrichH

Reputation: 83

Finally I found a solution for this problem in:

Abaqus-Python misbehavior

To solve the problem, a certain environment variable needs to be removed:

    import os
    try:
        os.environ.pop('PYTHONIOENCODING')
    except KeyError:
        pass
    subprocess.call(['/opt/Abaqus/Commands/abq6132 job=test.inp'], shell=True)

Upvotes: 4

Related Questions