LS-OPT

Last modified: Monday November 15, 2010 11:16 AM

Environment

The ls-opt module is provided for setting up your environment for LS-OPT.

Documentation

The PDF documentation can be found at $LSOPT_HOME/lsopt_XX_manual.pdf (eg. lsopt_42_manual.pdf for version 4.2 on Eos) on the system where it is installed. $LSOPT_HOME is available after you load the ls-opt module.

Batch Jobs

LS-OPT can submit jobs to the batch system for running LS-DYNA simulations. This section provides driver scripts that can submit serial, MPI, and OpenMP jobs to run LS-DYNA for TORQUE on Eos. These driver scripts are based on the examples from Section 9.12 of the LS-OPT 4.1 User's Manual.

First, specify the following in your command file for LS-OPT to use the driver script to submit jobs to the batch system on Eos:

solver command "/full/path/to/script/driver_script_name"
solver concurrent jobs 0
solver queue pbs

Then, use one of the below driver scripts that can be used with LS-OPT to spawn LS-DYNA jobs. The driver script MUST have executable permissions. So run the following command to add executable permissions for the driver script:

chmod +x driver_script_name

For more information about LS-DYNA, see the LS-DYNA FAQ page.

Serial Driver Script

#!/bin/bash

#
# sample driver script for submitting serial jobs with LS-OPT
#

########################################################################
# generate the job script
cat > dynscr << EOF
#PBS -l nodes=1:ppn=1
#PBS -l walltime=1:00:00
#PBS -l mem=400mb
#PBS -N lsopt
#PBS -j oe
#PBS -S /bin/bash

module load intel/compilers
module load ls-dyna ls-opt

export LSOPT_HOST=$LSOPT_HOST
export LSOPT_PORT=$LSOPT_PORT

mkdir -p \$PBS_O_WORKDIR
cd \$PBS_O_WORKDIR

wrapper ls-dyna i=DynaOpt.inp memory=100mw
EOF

########################################################################
# submit the job script
qsub dynscr
#
########################## end driver script ###########################

MPI Driver Script

#!/bin/bash

#
# sample driver script for submitting MPI jobs with LS-OPT
#

########################################################################
# generate the job script
cat > dynscr << EOF
#PBS -l nodes=1:ppn=8
#PBS -l walltime=1:00:00
#PBS -l mem=3200mb
#PBS -N lsopt
#PBS -j oe
#PBS -S /bin/bash

module load intel/compilers
module load ls-dyna ls-opt
module load openmpi

export LSOPT_HOST=$LSOPT_HOST
export LSOPT_PORT=$LSOPT_PORT

mkdir -p \$PBS_O_WORKDIR
cd \$PBS_O_WORKDIR

wrapper mpirun ls-dyna-mpi i=DynaOpt.inp memory=100mw
EOF

########################################################################
# submit the job script
qsub dynscr
#
########################## end driver script ###########################

OpenMP Driver Script

#!/bin/bash

#
# sample driver script for submitting OpenMP jobs with LS-OPT
#

########################################################################
# generate the job script
cat > dynscr << EOF
#PBS -l nodes=1:ppn=4
#PBS -l walltime=1:00:00
#PBS -l mem=400mb
#PBS -N lsopt
#PBS -j oe
#PBS -S /bin/bash

module load intel/compilers
module load ls-dyna ls-opt

export LSOPT_HOST=$LSOPT_HOST
export LSOPT_PORT=$LSOPT_PORT

mkdir -p \$PBS_O_WORKDIR
cd \$PBS_O_WORKDIR

export OMP_NUM_THREADS=4
wrapper ls-dyna i=DynaOpt.inp ncpu=4 memory=100mw
EOF

########################################################################
# submit the job script
qsub dynscr
#
########################## end driver script ###########################