Abaqus runs error through pbs

When the abaqus command is used in the job, it can be successfully executed. But if the int parameter is not added, an error will be reported.


The INT datatype to be used in the Abaqus solver seems to mandatory for Abaqus.
If you could successfully run the abaqus solver using the input file via batch command line without openpbs, then this should run using the PBS Script as well. If you could describe the issue a bit more that would be helpful to find out whether it is related to system, solver or workload manager configuration.

Mr adarsh,thanks for your reply to support. INT is not a datatype. It’s full name is interactive. If I use int in batch command line, it will output log messages to screen(stdout/stderr). Otherwise, it will run abaqus in background, and create log file to record log messages. I use pbs script to run abaqus without INT, it will terminate with error and output error messages in log file, the .out file I set will be empty. If I use INT, it runs normal and output messages in this file, and abaqus will not create log file.

1 Like

Thank you @wakaka .
INT meaning interactive, please correct me if i am wrong again.

To have an interactive log file , the abaqus batch command line is
/opt/software/abaqus/Commands/abq6144 job=inputfile interactive

Without interactive option in the batch command, the below batch command fails
/opt/software/abaqus/Commands/abq6144 job=inputfile cpus=1

You would have to check with the applicaiton vendor - whether it is required to include “interactive” in the abaqus batch command line, while using it with workload managmeent system or queuing systems. It seems form your experiment, it seems interactive is required.

FYI:
With the below PBS attributes in the job script , the stdout/stderr files will be available only after the job has completed (failed or successfully completed/finished)

#PBS -o  /absolute/path/to/stdoutlocation
#PBS -e /absolute/path/to/stderrorlocation

If you are using #PBS -koed , make sure the location from which script and inputfile exists is common or shared location across PBS Server and compute nodes and the $PBS_HOME/mom_priv/config has a $usecp attribute with this share location.

Refer: No output and error file generated run time - #2 by adarsh
Refer: Section: 3.3.6 Writing Files Directly to Final Destination from this document https://help.altair.com/2024.1.0/PBS%20Professional/PBS2024.1.pdf

It acts by design, if a shell script exit, it usually send SIGHUP to its children (exception might apply when you are using shell interactively or crontab ). a non-int abaqus run will quickly go to background and PBS script exit right after it. if you append something like /bin/sleep 1000 after it and you could keep abaqus happy for a while.

I tried to add this content at the end of the script: /bin/sleep 1000, which indeed allows abaqus to run successfully in the background, and pbs is also waiting for /bin/sleep 1000 to finish running before exiting. After abaqus enters the background, the script should exit immediately, resulting in execution failure, but adding /bin/sleep 1000 is not a good solution. How can I make the pbs script wait for abaqus to finish running in the background before exiting? I tried using wait, but it didn’t work.

you mentioned it already, just add ‘interactive’ to the abaqus cmdline and it will not go to background.
pbs will record those ‘screen’ output to .e .o file, you wont miss the screen output, or using > run.out to redirect if you prefer to do this way.

Yes, as you said, adding “interactive” can allow PBS to capture the screen output to confirm that the script has not ended. The problem is that I plan not to add “interactive” and let abaqus run in the background, and let the script exit after abaqus finishes running, or let PBS know that abaqus has finished running before ending the script task, without my active intervention. This seems difficult to achieve. Of course, it is not just abaqus, including other software that can run in the background, which will also face this situation.

i guess you could approach from the other side,
say to use “interactive” along with “&” to send the command to background in bash,then do something,then call wait

not sure if there is pitfall,but it should be doable

Abaqus is strange. :slight_smile:

You might try something like this:

#!/bin/bash
#PBS ...
...
abaqus ...
pidwait -s 0 abaqus

Where you might need to replace “abaqus” on the pidwait line with the actual name of the executable.

The idea is that you let abaqus run in the background, but use the pidwait command to pause until it finishes. This should work unless abaqus assigns itself a different session ID when going to the background. (The -s 0 option assumes abaqus keeps the job’s session ID.)

1 Like

Theoretically yes.
However there are lots of stages for a abaqus run, each goes with different executables, lets say Pre/Standard/Explicit and/or with _dp, _sp suffix, or just ‘python’ , its hard to tell.

Do these various stages have a common parent? You could wait on that.

Unfortunately, the pidwait command is not supported in the script.

The interactive mode is not available now. If the interactive mode is used, once an error occurs during the operation of abaqus, abaqus will be blocked and the pbs script will not exit, causing pbs to think that the job is not completed and occupy resources.

It that is the case, pidwait or something similar would block you, too. Also, the background process will become zombie without revealing itself.

it should be python or python3 depending on the version.

If I run abaqus through command line on Linux, but not pbs, when I add interactive, once it’s error, it will block to wait for you to do something to exit, I always enter Ctrl+c to interrupt. If I don’t use interactive, it runs in background and exits automatically when it occurs error.
I hope that pbs can exit automatically when abaqus in error, so I don’t use interactive to run. But it seems that pbs can’t run background command.

Instead of pidwait, can check with using “wait”

#!/bin/bash
#PBS ...
...
abaqus batch command line  &
PID=$!
wait $PID