SHELL 22.1

Customising the Ansys LS-DYNA Submission Script

Customising the Ansys LS-DYNA Submission Script

The SHELL generates either a LINUX CShell/Bourne Shell script ( jobname.ctl ) or a DOS batch file ( jobname.bat ) that contains all of the selected Ansys LS-DYNA job options. On LINUX systems the choice of either CShell or Bourne Shell is controlled by the shell*submit_shell option in the oa_pref file.

In version 22.1 of the SHELL the contents of these batch files can be modified by editing the "oasys.submit" file located in the installation directory.

The batch file created by the submission SHELL is split into 4 sections

Contents
Queuing Commands Queue commands for NQS, SGE, LSF and PBS queuing systems. If the job is not submitted to a queue then this section of the batch file will be empty. Automatically generated by the SHELL
Environment Variables This section of the batch file sets up a number of Environment variables. The first group contain information relating to license systems while the second set contain information relating to the selected version of Ansys LS-DYNA and the job. Automatically generated by the SHELL
Ansys LS-DYNA submission This section of the batch file contains the commands that are actually used to run Ansys LS-DYNA. The contents of this section are included from a file in the installations directory. User configurable
Post Processing Options Commands for running T/HIS and automatically after the Ansys LS-DYNA job terminates. Automatically generated by the SHELL

The following sections include examples taken from the batch file created for a job submitted to a PBS queuing system on a LINUX machine

Queuing Commands

The SHELL will automatically add queuing commands to the start of the batch file. The options supported for the different queuing systems are as follows.

Option NQS PBS SGE LSF
log file -o "logfile" -o "logfile" -o "logfile" -o "logfile"
error file -eo -e "errorfile" -e "errorfile" -e "errorfile"
queue name -q "queuename" -q "queuename" -l g= "queuename" -q "queuename"
start time -a "start time" -a "start time" -b "start time"
Memory Limit -lM "limit" -M "limit"
CPU Limit -lT "limit" -l h_cpu= "limit" -c "limit"
File Limit -lF "limit"

The log and error file output options can be disabled by setting the preference options shell*queue_output_file and shell*queue_error_file to FALSE .

Environment Variables

The following environment variables are automatically set up in the batch file by the SHELL.

Variable Description
OA_INSTALL Full pathname of the software installation directory
LSTC_FILE Full pathname of the LSTC license file. If a LSTC license server is being used then this variable will replaced with the LSTC_LICENSE_SERVER, LSTC_INTERNAL_CLIENT and LSTC_LICENSE variables.
LSTC_MEMORY Set to auto if the automatic memory option has been selected
LMX_LICENSE_PATH LMX license information for software suite
LSDYNA_VERSION Full pathname of the selected Ansys LS-DYNA version
LSDYNA_MPP Set to TRUE if a MPP version of Ansys LS-DYNA had been selected
LSDYNA_HYBRID Set to TRUE if a HYBRID version of Ansys LS-DYNA had been selected
LSDYNA_HYBRID_MPP_THREADS Number of HYBRID MPP threads selected
LSDYNA_HYBRID_SMP_THREADS Number of HYBRID SMP threads selected
LSDYNA_MPI_TYPE MPI version from "dyna_versions" file
LSDYNA_DOUBLE Set to TRUE if a double precision version of Ansys LS-DYNA had been selected
LSDYNA_ONLINE Set to TRUE if the job has been submitted using the Online option.
LSDYNA_BACKGROUND Set to TRUE if the job has been submitted using the Background option.
LSDYNA_BATCH Set to TRUE if the job has been submitted using the Batch option.
LSDYNA_QUEUE Set to TRUE if the job has been submitted using the Queue option.
LSDYNA_QUEUE_NAME Name of the QUEUE selected
LSDYNA_QUEUE_COMMAND_<n> Queue commands used (where <n> = 1-20)
LSDYNA_JOB_DIR Full pathname of the directory containing the Ansys LS-DYNA job
LSDYNA_JOB_FILE Name of the file containing the Ansys LS-DYNA job information
LSDYNA_JOB_NAME Name of the Ansys LS-DYNA job
LSDYNA_JOB_CPUS Number of CPU's selected for parallel jobs
LSDYNA_USER_ID Username
LSDYNA_LOCAL_HOST TRUE if submitting MPP jobs to the local machine
LSDYNA_NODE_FILE

Set to TRUE if submitting MPP jobs using a file containing the list of nodes to use

NODE_FILE Filename containing the list of nodes to use.
LSDYNA_NODE_LIST

Set to TRUE if submitting MPP jobs using a string containing the list of nodes to use

NODE_LIST String containing the list of nodes to use.
LSDYNA_RESTART_FILE Filename of Ansys LS-DYNA restart dump file if the analysis is a restart.
LSDYNA_RESTART_INPUT_FILE Filename of Ansys LS-DYNA restart input file if the analysis is a restart and a input file has been selected.
LSDYNA_CL_ARGS List of command line arguments used. This will only be set if the CASE or MCHECK options have been selected.

#
# License file variables
#
setenv OASYS /data/dyna10/linux_executables
setenv LSTC_FILE /prg/LSTC_FILE
setenv LSTC_MEMORY auto
setenv ARUP_LICENSE_PATH @atuhp022:@atghps03
#
# Job variables
#
setenv LSDYNA_VERSION /data/dyna10/linux_executables/ls970_s_5434_ia64_sgi_p.exe
setenv LSDYNA_MPP FALSE
setenv LSDYNA_DOUBLE FALSE
setenv LSDYNA_ONLINE TRUE
setenv LSDYNA_BACKGROUND FALSE
setenv LSDYNA_BATCH FALSE
setenv LSDYNA_QUEUE FALSE
setenv LSDYNA_JOB_DIR /local/test
setenv LSDYNA_JOB_FILE shell_test.temp
setenv LSDYNA_JOB_CPUS 2
setenv LSDYNA_USER_ID rogerh
setenv LSDYNA_LOCAL_HOST FALSE
setenv LSDYNA_NODE_FILE TRUE
setenv NODE_FILE /local/test/nodelist
setenv LSDYNA_NODE_LIST FALSE
#

Ansys LS-DYNA Submission

The commands to run Ansys LS-DYNA are included from a user configurable file called "oasys.submit" located in the software installation directory.

As the file is included after the Environment Variable section of the batch file all of the variables that are set up can be used within the include file. This means that a single include file "oasys.submit" can be configured if required which contains separate sections for SMP / MPP jobs.

Example of a LINUX "oasys.submit" File

The following example shows the default "oasys.submit" file that is included with the version 22.1 software on LINUX platforms. The default script is setup to submit jobs on a LINUX machine using the PBS queueing system but it should be easy to reconfigure to other machines and queueing systems.

As MPP jobs can use a number of different MPI libraries on LINUX systems this script shows how to submit jobs using HP-MPI, INTEL MPIand MPICH. The default script is setup assuming that the different MPI libaries have been installed in the following directories:

MPI Directory
HP-MPI /opt/hpmpi
INTEL MPI /opt/intel
OPEN MPI /opt/openmpi

#
# The following Environment Variables are available for this script
#
# $LSDYNA_VERSION : full pathname of selected LS-DYNA executable
# $LSDYNA_MPP : TRUE if MPP version selected
# $LSDYNA_MPI_TYPE : MPI version
# $LSDYNA_DOUBLE : TRUE if double precision version selected
# $LSDYNA_ONLINE : TRUE if the job has been submitted ONLINE
# $LSDYNA_BACKGROUND : TRUE if the job has been submitted to BACKGROUND
# $LSDYNA_BATCH : TRUE if the job has been submitted using BATCH
# $LSDYNA_QUEUE : TRUE if the job has been submitted to a QUEUE
# $LSDYNA_JOB_DIR : full path of LS-DYNA job_directory
# $LSDYNA_JOB_FILE : filename containing LS-DYNA job options
# $LSDYNA_JOB_CPUS : number of CPU's selected
# $LSDYNA_USER_ID : username
# $LSDYNA_LOCAL_HOST : TRUE if submitting MPP jobs to the local machine
# $LSDYNA_NODE_FILE : TRUE if submitting MPP jobs using a Node File
# $NODE_FILE : filename containing node list for MPP jobs
# $LSDYNA_LOCAL_HOST : TRUE if submitting MPP jobs using a Node List
# $NODE_LIST : string containing node list for MPP jobs
# $LSDYNA_CL_ARGS : string containing command line arguments
# $LSDYNA_HYBRID : TRUE if HYBRID version selected
# $LSDYNA_MPP_THREADS : Number of MPP threads selected for the HYBRID version
# $LSDYNA_SMP_THREADS : Number of SMP threads selected for the HYBRID version
#
#
# ==============================================================================
#
#
# THE REST OF THIS SCRIPT HAS BEEN CONFIGURED FOR SUBMITING LS-DYNA JOBS TO A LINUX SYSTEM USING
# THE PBS QUEUEING SYSTEM. YOU WILL HAVE TO MODIFY THE FOLLOWING IF YOU ARE USING A DIFFERENT
# QUEUEING STSTEM OR MACHINE TYPE.
#
# ==============================================================================
#
# Uncomment the following commands if you want to create sub-directories for your analyses.
# This will only work if you are using the PBS queueing system, as the folders are named
# after the PBS job id.
#
# Make a new directory for the results - only uncomment one of these lines
# The first one will give the full job id, the second just the job id number
#
#set RESULTS_DIR = $PBS_JOBID
#set RESULTS_DIR = `echo $PBS_JOBID | awk '{split($0,a,"."); print a[1]}'`
#
#mkdir $LSDYNA_JOB_DIR/$RESULTS_DIR
#
# Get the root name of the job
#
#set ROOT = $LSDYNA_JOB_FILE:r
#
# Copy the .temp, names and key file to the results directory
#
#set KEY = ".key"
#set NAMES = "names"
#
#cp $LSDYNA_JOB_DIR/$ROOT$KEY $RESULTS_DIR/.
#cp $LSDYNA_JOB_DIR/$LSDYNA_JOB_FILE $RESULTS_DIR/.
#cp $LSDYNA_JOB_DIR/$NAMES $RESULTS_DIR/.
#
# Change job directory to the results directory
#
#set LSDYNA_JOB_DIR = $RESULTS_DIR
#cd $LSDYNA_JOB_DIR
#

#
if ($LSDYNA_MPP != "TRUE" && $LSDYNA_HYBRID != "TRUE") then
#
# ==============================================================================
# SMP LS-DYNA submission
# ==============================================================================
#
$LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_MPP == "TRUE") then
#
# ==============================================================================
# MPP LS-DYNA submission
# ==============================================================================
#
# HP-MPI
#
if ($LSDYNA_MPI_TYPE == "HP-MPI") then
#
setenv HPMPI_DIR /opt/hpmpi/bin
#
# Submit a job to a PBS queueing system
#
if ($LSDYNA_QUEUE == "TRUE") then
#
if (-e $PBS_NODEFILE) then
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
if (-f $PBS_NODEFILE) then
foreach roger ( `cat $PBS_NODEFILE` )
echo "-h $roger -np 1 $LSDYNA_VERSION $LSDYNA_CL_ARGS" >> $LSDYNA_JOB_DIR/appfile
set LSDYNA_CL_ARGS = ""
end
endif
endif
$HPMPI_DIR/mpirun -prot -e MPI_WORKDIR=$LSDYNA_JOB_DIR -f appfile
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
#
# Submit a job online
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_JOB_CPUS $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_JOB_CPUS -hostfile $NODE_FILE -e LSTC_LICENSE_SERVER=$LSTC_LICENSE_SERVER -e LSTC_LICENSE=$LSTC_LICENSE $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_JOB_CPUS -hostlist $NODE_LIST -e LSTC_LICENSE_SERVER=$LSTC_LICENSE_SERVER -e LSTC_LICENSE=$LSTC_LICENSE $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif
#
# INTEL MPI
#
else if ($LSDYNA_MPI_TYPE == "INTEL") then
#
setenv INTEL_DIR /opt/intel/impi/4.0.3/bin64
set mpi_dir=$INTEL_DIR
source $mpi_dir/mpivars.csh
#
if ($LSDYNA_QUEUE == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_JOB_CPUS -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_JOB_CPUS -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_JOB_CPUS -machinefile $NODE_FILE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_JOB_CPUS -hosts $NODE_LIST -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif
#
# OPEN MPI
#
else if ($LSDYNA_MPI_TYPE == "OPENMPI") then
#
setenv MPI_ROOT /opt/openmpi
setenv OPENMPI_DIR $MPI_ROOT/bin
#
if !($?PATH) then
setenv PATH $MPI_ROOT/bin
else
setenv PATH $MPI_ROOT/bin:$PATH
endif
if !($?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH $MPI_ROOT/lib
else
setenv LD_LIBRARY_PATH $MPI_ROOT/lib:$LD_LIBRARY_PATH
endif
#
if ($LSDYNA_QUEUE == "TRUE") then
#
if (-e $PBS_NODEFILE) then
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
if (-f $PBS_NODEFILE) then
foreach host ( `cat $PBS_NODEFILE` )
echo "$host" >> $LSDYNA_JOB_DIR/appfile
end
endif
endif
$OPENMPI_DIR/mpirun -machinefile appfile -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_JOB_CPUS -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_JOB_CPUS -machinefile $NODE_FILE -x PATH -x LD_LIBRARY_PATH -x LSTC_LICENSE_SERVER -x LSTC_LICENSE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_JOB_CPUS -host $NODE_LIST -x PATH -x LD_LIBRARY_PATH -x LSTC_LICENSE_SERVER -x LSTC_LICENSE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif
#
endif
#
else if ($LSDYNA_HYBRID == "TRUE") then
#
# ==============================================================================
# HYBRID LS-DYNA submission
# ==============================================================================
#
# HP-MPI
#
if ($LSDYNA_MPI_TYPE == "HP-MPI") then
#
setenv HPMPI_DIR /opt/hpmpi/bin
#
if ($LSDYNA_QUEUE == "TRUE") then
#
if (-e $PBS_NODEFILE) then
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
if (-f $PBS_NODEFILE) then
set last_host = ""
foreach host ( `sort $PBS_NODEFILE` )
if ( $host != $last_host) then
set count = 0
endif
@ count = $count + 1
if ( $count == 1) then
echo "-h $host -np 1 $LSDYNA_VERSION" $LSDYNA_CL_ARGS >> $LSDYNA_JOB_DIR/appfile
set LSDYNA_CL_ARGS = ""
endif
if ($count == $LSDYNA_HYBRID_SMP_THREADS) then
set count = 0
endif
set last_host = $host
end
endif
endif
$HPMPI_DIR/mpirun -cpu_bind -prot -e MPI_WORKDIR=$LSDYNA_JOB_DIR -f appfile
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_HYBRID_MPP_THREADS $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_HYBRID_MPP_THREADS -hostfile $NODE_FILE -e LSTC_LICENSE_SERVER=$LSTC_LICENSE_SERVER -e LSTC_LICENSE=$LSTC_LICENSE $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$HPMPI_DIR/mpirun -prot -np $LSDYNA_HYBRID_MPP_THREADS -hostlist $NODE_LIST -e LSTC_LICENSE_SERVER=$LSTC_LICENSE_SERVER -e LSTC_LICENSE=$LSTC_LICENSE $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif
#
# INTEL MPI
#
else if ($LSDYNA_MPI_TYPE == "INTEL") then
#
setenv INTEL_DIR /opt/intel/impi/4.0.3/bin64
set mpi_dir=$INTEL_DIR
source $mpi_dir/mpivars.csh
#
if ($LSDYNA_QUEUE == "TRUE") then
#
if (-e $PBS_NODEFILE) then
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
if (-f $PBS_NODEFILE) then
set last_host = ""
foreach host ( `sort $PBS_NODEFILE` )
if ( $host != $last_host) then
set count = 0
endif
@ count = $count + 1
if ( $count == 1) then
echo "$host" >> $LSDYNA_JOB_DIR/appfile
set LSDYNA_CL_ARGS = ""
endif
if ($count == $LSDYNA_HYBRID_SMP_THREADS) then
set count = 0
endif
set last_host = $host
end
endif
endif
$INTEL_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -machinefile appfile -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -machinefile $NODE_FILE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$INTEL_DIR/mpirun -n $LSDYNA_HYDIRD_MPP_THREADS -hosts $NODE_LIST -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif

#
# OPEN MPI
#
else if ($LSDYNA_MPI_TYPE == "OPENMPI") then
#
setenv MPI_ROOT /opt/openmpi
setenv OPENMPI_DIR $MPI_ROOT/bin
#
if !($?PATH) then
setenv PATH $MPI_ROOT/bin
else setenv PATH $MPI_ROOT/bin:$PATH
endif
if !($?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH $MPI_ROOT/lib
else
setenv LD_LIBRARY_PATH $MPI_ROOT/lib:$LD_LIBRARY_PATH
endif
#
if ($LSDYNA_QUEUE == "TRUE") then
#
if (-e $PBS_NODEFILE) then
rm -rf $LSDYNA_JOB_DIR/appfile >& /dev/null
if (-f $PBS_NODEFILE) then
set last_host = ""
foreach host ( `sort $PBS_NODEFILE` )
if ( $host != $last_host) then
set count = 0
endif
@ count = $count + 1
if ( $count == 1) then
echo "$host" >> $LSDYNA_JOB_DIR/appfile
set LSDYNA_CL_ARGS = ""
endif
if ($count == $LSDYNA_HYBRID_SMP_THREADS) then
set count = 0
endif
set last_host = $host
end
endif
endif
$OPENMPI_DIR/mpirun -machinefile appfile -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_ONLINE == "TRUE") then
#
if ($LSDYNA_LOCAL_HOST == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_FILE == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -machinefile $NODE_FILE -x PATH -x LD_LIBRARY_PATH -x LSTC_LICENSE_SERVER -x LSTC_LICENSE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
else if ($LSDYNA_NODE_LIST == "TRUE") then
#
$OPENMPI_DIR/mpirun -n $LSDYNA_HYBRID_MPP_THREADS -host $NODE_LIST -x PATH -x LD_LIBRARY_PATH -x LSTC_LICENSE_SERVER -x LSTC_LICENSE -wdir $LSDYNA_JOB_DIR $LSDYNA_VERSION $LSDYNA_CL_ARGS
#
endif
#
endif
#
endif
#
endif
#

Example of a Windows "oasys.submit" File

The following example shows the default "oasys.submit" file that is included with the version 22.1 software on PC platforms.

As MPP jobs can use either the HP-MPI or MPICH MPI libraries this script shows how to submit jobs using both of them. The default script is setup assuming that the different MPI libaries have been installed in the following directories.

MPI Directory
HP-MPI C:\Program Files (x86)\Hewlett-Packard\HP-MPI
PLATFORM MPI C:\Program Files (x86)\Platform Computing\Platform-MPI
MPICH 2 C:\Program Files\MPICH2
INTEL MPI C:\Program Files (x86)\Intel

This script also shows

  1. How to submit MPP jobs to either the local machine or to multiple machines using either a file containing a list of hostnames or a string containing the hostnames.
  2. How to pass environment variables for license options to the remote hosts via the mpirun command.


REM The following Environment Variables are available for this script
REM
REM LSDYNA_VERSION : full pathname of selected LS-DYNA executable
REM LSDYNA_MPP : TRUE if MPP version selected
REM LSDYNA_MPI_TYPE : MPI version
REM LSDYNA_DOUBLE : TRUE if double precision version selected
REM LSDYNA_ONLINE : TRUE if the job has been submitted ONLINE
REM LSDYNA_BACKGROUND : TRUE if the job has been submitted to BACKGROUND
REM LSDYNA_BATCH : TRUE if the job has been submitted using BATCH
REM LSDYNA_QUEUE : TRUE if the job has been submitted to a QUEUE
REM LSDYNA_JOB_DIR : full path of LS-DYNA job_directory
REM LSDYNA_JOB_FILE : filename containing LS-DYNA job options
REM LSDYNA_JOB_CPUS : numbert of CPU's selected
REM LSDYNA_USER_ID : username
REM LSDYNA_LOCAL_HOST : TRUE if submitting MPP jobs to the local machine
REM LSDYNA_NODE_FILE : TRUE if submitting MPP jobs using a Node File
REM NODE_FILE : filename containing node list for MPP jobs
REM LSDYNA_LOCAL_HOST : TRUE if submitting MPP jobs using a Node List
REM NODE_LIST : string containing node list for MPP jobs
REM LSDYNA_CL_ARGS : string containing command line arguments
REM
REM Set windows operating system to determine the path to the MPI executable
REM Uncomment if you want to run the 64bit version
REM
REM set WINOS=WIN32
set WINOS=WIN64
REM
REM Set LSTC variables if not already set via system (uncomment if needed)
REM
REM Set LSTC variables if not already set via system
REM - Local licenses
REM set LSTC_LICENSE=local
REM LSTC_FILE=C:\Licenses\lstc_file
REM Network licenses
set LSTC_LICENSE=network
set LSTC_LICENSE_SERVER=vdgcls01
set LSTC_INTERNAL_CLIENT off
REM
REM SMP LS-DYNA submission
REM ======================
REM
IF %LSDYNA_MPP% == TRUE GOTO :MPP
%LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
REM
REM MPP LS-DYNA submission
REM ======================
REM
:MPP
REM
REM SETUP MPI RUN COMMANDS
REM
REM - HP MPI
REM
IF NOT %LSDYNA_MPI_TYPE% == HPMPI GOTO :PLATFORM
IF %WINOS% == WIN32 set MPI_ROOT=C:\Program Files\Hewlett-Packard\HP-MPI
IF %WINOS% == WIN32 set MPIRUN="C:\Program Files\Hewlett-Packard\HP-MPI\bin\mpirun"
IF %WINOS% == WIN64 set MPI_ROOT=C:\Program Files (x86)\Hewlett-Packard\HP-MPI
IF %WINOS% == WIN64 set MPIRUN="C:\Program Files (x86)\Hewlett-Packard\HP-MPI\bin\mpirun"
GOTO :RUN_MPP
REM
REM - PLATFORM MPI
REM
:PLATFORM
IF NOT %LSDYNA_MPI_TYPE% == PMPI GOTO :INTEL
IF %WINOS% == WIN32 set MPI_ROOT=C:\Program Files\Platform Computing\Platform-MPI
IF %WINOS% == WIN32 set MPIRUN="C:\Program Files\Platform Computing\Platform-MPI\bin\mpirun"
IF %WINOS% == WIN64 set MPI_ROOT=C:\Program Files (x86)\Platform Computing\Platform-MPI
IF %WINOS% == WIN64 set MPIRUN="C:\Program Files (x86)\Platform Computing\Platform-MPI\bin\mpirun"
IF %LSDYNA_MPI_TYPE% == PMPI set LSDYNA_MPI_TYPE=HPMPI
GOTO :RUN_MP
REM
REM - INTEL MPI
REM
:INTEL
IF NOT %LSDYNA_MPI_TYPE% == IMPI GOTO :MPICH
IF %WINOS% == WIN32 set MPIRUN="C:\Program Files\Intel\MPI-RT\4.1.0.028\ia32\bin\mpiexec.exe"
IF %WINOS% == WIN64 set MPIRUN="C:\Program Files (x86)\Intel\MPI-RT\4.1.0.028\em64t\bin\mpiexec.exe"
GOTO :RUN_MPP
REM
REM - MPICH2
REM
:MPICH
IF NOT %LSDYNA_MPI_TYPE% == MPICH2 GOTO :NO_MATCH
IF %WINOS% == WIN32 set MPIRUN="C:\Program Files\MPICH2\bin\mpiexec.exe"
IF %WINOS% == WIN64 set MPIRUN="C:\Program Files\MPICH2\bin\mpiexec.exe"
GOTO :RUN_MPP
REM
REM
:NO_MATCH
ECHO MPI TYPE NOT RECOGNISED
exit
REM
:RUN_MPP
cd %LSDYNA_JOB_DIR%
REM
REM RUN ANALYSIS
REM
REM HP-MPI or PLATFORM MPI using local machine
REM
IF %LSDYNA_MPI_TYPE% == HPMPI (
IF %LSDYNA_LOCAL_HOST% == TRUE (
%MPIRUN% -prot -np %LSDYNA_JOB_CPUS% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_FILE% == TRUE (
%MPIRUN% -prot -cache -np %LSDYNA_JOB_CPUS% -hostfile %NODE_FILE% -e LSTC_LICENSE_SERVER=%LSTC_LICENSE_SERVER% -e LSTC_LICENSE=%LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_LIST% == TRUE (
%MPIRUN% -prot -cache -np %LSDYNA_JOB_CPUS% -hostlist %NODE_LIST% -e LSTC_LICENSE_SERVER=%LSTC_LICENSE_SERVER% -e LSTC_LICENSE=%LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
)
REM
REM INTEL-MPI using local machine
REM
IF %LSDYNA_MPI_TYPE% == IMPI (
IF %LSDYNA_LOCAL_HOST% == TRUE (
%MPIRUN% -n %LSDYNA_JOB_CPUS% -wdir %LSDYNA_JOB_DIR% -localonly %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_FILE% == TRUE (
%MPIRUN% -n %LSDYNA_JOB_CPUS% -machinefile %NODE_FILE% -wdir %LSDYNA_JOB_DIR% -mapall -genv LSTC_LICENSE_SERVER %LSTC_LICENSE_SERVER% -genv LSTC_LICENSE %LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_LIST% == TRUE (
%MPIRUN% -hosts %NODE_LIST% -wdir %LSDYNA_JOB_DIR% -mapall -genv LSTC_LICENSE_SERVER %LSTC_LICENSE_SERVER% -genv LSTC_LICENSE %LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
)
REM
REM MPICH2
REM
IF %LSDYNA_MPI_TYPE% == MPICH2 (
IF %LSDYNA_LOCAL_HOST% == TRUE (
%MPIRUN% -n %LSDYNA_JOB_CPUS% -wdir %LSDYNA_JOB_DIR% -localonly %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_FILE% == TRUE (
%MPIRUN% -n %LSDYNA_JOB_CPUS% -machinefile %NODE_FILE% -wdir %LSDYNA_JOB_DIR% -mapall -genv LSTC_LICENSE_SERVER %LSTC_LICENSE_SERVER% -genv LSTC_LICENSE %LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
IF %LSDYNA_NODE_LIST% == TRUE (
%MPIRUN% -hosts %NODE_LIST% -wdir %LSDYNA_JOB_DIR% -mapall -genv LSTC_LICENSE_SERVER %LSTC_LICENSE_SERVER% -genv LSTC_LICENSE %LSTC_LICENSE% %LSDYNA_VERSION% %LSDYNA_CL_ARGS%
GOTO :DONE
)
)
REM
REM
:DONE

Post Processing Options

When a Ansys LS-DYNA job is submitted using the SHELL automatic post processing options for and T/HIS can be selected. This section of the batch file contains any commands required to carry out the selected post processing options.

#
# PRIMER 'ztf' file creation
#
/data/dyna11/linux_executables/primer20_64.exe -d=batch -ztf=/local/test/shell_test.key > \
shell_test.ztf_log
#
# T/HIS batch processing
#
setenv MENU_AUTO_CONFIRM true
/data/dyna10/linux_executables/this20_64.exe -d=x -tcf=shell_test.tcf -maximise shell_test.thf