Discussion:
Running a python script for abaqus on a unix server
Surbhi
2009-05-06 06:44:10 UTC
Permalink
hi!
I need to know the command to run a python script in a unix environment.
Till now i used to run inp files using the command
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe job=3dlj cpus=2 scratch=/no_backup

What can be the command for a python script?

Thankyou!
s***@wipro.com
2009-05-07 17:02:46 UTC
Permalink
Most of the latest unix (linux) versions do install python and hence you
could run just 'python' followed by python script file name- if not
abaqus also installs python with it. Syntax is just abaqus python - In
your case



-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
python yourscriptname.py











Regards,

Sridharan

From: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf
Of Surbhi
Sent: Wednesday, May 06, 2009 12:14 PM
To: ***@yahoogroups.com
Subject: [Abaqus] Running a python script for abaqus on a unix server








hi!
I need to know the command to run a python script in a unix environment.
Till now i used to run inp files using the command
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
job=3dlj cpus=2 scratch=/no_backup

What can be the command for a python script?

Thankyou!





[Non-text portions of this message have been removed]
Surbhi
2009-05-08 09:21:47 UTC
Permalink
I am getting the following error:
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe python ab_script4_working.py
Traceback (most recent call last):
File "ab_script4_working.py", line 17, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import

The script can be the same one that i run on CAE right? Do i have to add smething to the script?
Post by s***@wipro.com
Most of the latest unix (linux) versions do install python and hence you
could run just 'python' followed by python script file name- if not
abaqus also installs python with it. Syntax is just abaqus python - In
your case
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
python yourscriptname.py
Regards,
Sridharan
Of Surbhi
Sent: Wednesday, May 06, 2009 12:14 PM
Subject: [Abaqus] Running a python script for abaqus on a unix server
hi!
I need to know the command to run a python script in a unix environment.
Till now i used to run inp files using the command
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
job=3dlj cpus=2 scratch=/no_backup
What can be the command for a python script?
Thankyou!
[Non-text portions of this message have been removed]
Bartosz Gradzik
2009-05-08 17:00:26 UTC
Permalink
Hello,

If you want to import any objects from "abaqus" module with line:
"from abaqus import *" you have to run script within CAE or Viewer.

Command line in your case should look like this:
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe cae
script=ab_script4_working.py
or
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe viewer
script=ab_script4_working.py

You have also possibility to run script without graphic user interface
(GUI):
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe cae
noGUI=ab_script4_working.py
or
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe viewer
noGUI=ab_script4_working.py

For more information about running python scripts with Abaqus please take a
look to the documentation:
"2.2 How does the Abaqus Scripting Interface interact with Abaqus/CAE?".

Regards
Bartosz
----- Original Message -----
From: "Surbhi" <***@yahoo.co.in>
To: <***@yahoogroups.com>
Sent: Friday, May 08, 2009 11:21 AM
Subject: [Abaqus] Re: Running a python script for abaqus on a unix server


I am getting the following error:
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe python
ab_script4_working.py
Traceback (most recent call last):
File "ab_script4_working.py", line 17, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import

The script can be the same one that i run on CAE right? Do i have to add
smething to the script?
Post by s***@wipro.com
Most of the latest unix (linux) versions do install python and hence you
could run just 'python' followed by python script file name- if not
abaqus also installs python with it. Syntax is just abaqus python - In
your case
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
python yourscriptname.py
Regards,
Sridharan
Of Surbhi
Sent: Wednesday, May 06, 2009 12:14 PM
Subject: [Abaqus] Running a python script for abaqus on a unix server
hi!
I need to know the command to run a python script in a unix environment.
Till now i used to run inp files using the command
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
job=3dlj cpus=2 scratch=/no_backup
What can be the command for a python script?
Thankyou!
[Non-text portions of this message have been removed]
Surbhi
2009-05-13 04:51:35 UTC
Permalink
Hi!
I am not conversant in python scripting, just incorporated a couple of changes in an abaqus.rpy script to get the desired effects. Thing is, the problem is big and hence I cannot run the script on CAE on my computer. To circumvent this, I tried to submit the script on the hpc (for which i know the command to submit .inp files, but not python scripts.) Understandably, on using cae script=ab_script4_working , it does check for the license but then reports some fatal error.
Any suggestions?

-Surbhi.

sridharan_venkataramanan
2009-05-08 13:48:17 UTC
Permalink
No! The script needs modification. This is because when you do inside
CAE lot of modules are loaded. You need to import these modules inside
your script. Look at abaqus scripting manual. I strongly recommend
taking a scripting course by abaqus folks if you want to do some serious
scripting.
Post by Surbhi
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
python ab_script4_working.py
Post by Surbhi
File "ab_script4_working.py", line 17, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import
The script can be the same one that i run on CAE right? Do i have to
add smething to the script?
Post by Surbhi
Post by s***@wipro.com
Most of the latest unix (linux) versions do install python and hence you
could run just 'python' followed by python script file name- if not
abaqus also installs python with it. Syntax is just abaqus python - In
your case
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
python yourscriptname.py
Regards,
Sridharan
Of Surbhi
Sent: Wednesday, May 06, 2009 12:14 PM
Subject: [Abaqus] Running a python script for abaqus on a unix server
hi!
I need to know the command to run a python script in a unix
environment.
Post by Surbhi
Post by s***@wipro.com
Till now i used to run inp files using the command
-bash-2.05b$ /software/abaqus6.7.1/linuxix64/6.7-1/exec/abq671.exe
job=3dlj cpus=2 scratch=/no_backup
What can be the command for a python script?
Thankyou!
[Non-text portions of this message have been removed]
Loading...