Help:Ls-dyna

From CECS wiki
Jump to navigation Jump to search

LS-DYNA is a general purpose transient dynamic finite element program capable of simulating complex real world problems.

Vendor homepage
http://www.lstc.com/
Software availability
MMAE Unix and Windows on request
currently installed on:
  • cluster: arcadius (ask to get this installed on others)
  • biot, carnot
commands to type to run
ls-dyna command line solver (needs input file specified on command line)
lsprepost graphical pre- and post- processor, requires OpenGL (GLX) (download)
ls-ingrid integrated menu driven interface with optional GUI
ls-post postprocessor with GUI
ls-taurus (no license?)
ls-dyna also comes with several freeware utilities to assist with animation generation and image conversion. Ask if you need details or access to these.
View online documentation
Documentation inside LS-DYNA
Example command line
From ls-prepost, Save as --> keyword -> test.k
 ls-dyna I=test.k

Additional notes[edit]

ls-dyna includes many extra utilities for preprocessing and postprocessing. These parts may not all be installed on all systems. Please ask if you need something that does not work.

ls-dyna command line syntax[edit]

Command line syntax for ls-dyna is listed on page 54 of the keyword manual. (Getting Started -> Execution syntax)

Common options are:

I=inputfile   specify input filename
JOBID=jobid specify a filename prefix for all output files to prevent mixing results from separate runs in the same directory

lsprepost[edit]

lsprepost 3.0 starts by opening a zero size window. After it opens, resize the window by grabbing an edge and drag it larger.

pc-dyna[edit]

The Windows version of LSTC ls-dyna includes a manager called "pc-dyna" which is bundled with the single precision vesrion of the solver. To use the double precision solver, unpack the executable in C:\LSDYNA\program\ and make C:\LSDYNA\manager.ini writable. Select which solver you want to use from the Solvers menu in the manager.

use with slurm[edit]

#!/bin/bash
#SBATCH -c 4
#SBATCH --requeue --open-mode=append

INPUTFILE=yourinputfile.k

restart=""
if [ -f d3dump01 ] ; then
  restart="r=d3dump01"
fi

ls-dyna $restart NCPU=$SLURM_CPUS_PER_TASK i=$INPUTFILE 

NOTE:

  • Restart options have not been well tested. Please let us know if they work or if there are problems.
  • restarted jobs generally must use the same number of cpus as they started with
  • If multiple nodes are needed, add mp_mode=mpi (untested) and start tasks with srun (untested)
  • The restart code above is simplistic and assumes you will only keep one dump file.

use with SGE[edit]

If you are running lsdyna on a cluster, it may help to use a startup script like this:

#$ -cwd
#$ -S /bin/bash
#$ -pe mpich-one 4
#$ -ckpt caffe_ckpt -c 36000 -r y

INPUTFILE="data.k"
SCRATCH_DIR=/scratch/$USER-$JOB_ID
mkdir $SCRATCH_DIR

restart=""
if [ -f d3dump01 ] ; then
  restart="r=d3dump01"
fi

ls-dyna $restart i=$INPUTFILE NCPU=$NSLOTS scratch=$SCRATCH_DIR 

rmdir $SCRATCH_DIR

NOTE:

  • restart options have not been well tested. Please let us know if they work or if there are problems.
  • restarted jobs generally must use the same number of cpus as they started with

Meaning of checkpoint options:

-r y
job is restartable
-ckpt lsdyna_ckpt
use lsdyna method to trigger checkpoint and migration
-c 36000
checkpoint every 10 hours
$RESTARTED
your script can check for this environment variable to see if the job was restarted automatically