This page has not been updated yet. The page does not reflect the transition from PBS to Slurm.
# ANSYS LS-DYNA
# ANSYS LS-DYNA
[ANSYSLS-DYNA][a] provides convenient and easy-to-use access to the technology-rich, time-tested explicit solver without the need to contend with the complex input requirements of this sophisticated program. Introduced in 1996, ANSYS LS-DYNA capabilities have helped customers in numerous industries to resolve highly intricate design issues. ANSYS Mechanical users have been able to take advantage of complex explicit solutions for a long time utilizing the traditional ANSYS Parametric Design Language (APDL) environment. These explicit capabilities are available to ANSYS Workbench users as well. The Workbench platform is a powerful, comprehensive, easy-to-use environment for engineering simulation. CAD import from all sources, geometry cleanup, automatic meshing, solution, parametric optimization, result visualization, and comprehensive report generation are all available within a single fully interactive modern graphical user environment.
[ANSYSLS-DYNA][a] provides convenient and easy-to-use access to the technology-rich,
time-tested explicit solver without the need to contend
with the complex input requirements of this sophisticated program.
Introduced in 1996, ANSYS LS-DYNA capabilities have helped customers in numerous industries
to resolve highly intricate design issues.
ANSYS Mechanical users have been able to take advantage of complex explicit solutions
for a long time utilizing the traditional ANSYS Parametric Design Language (APDL) environment.
These explicit capabilities are available to ANSYS Workbench users as well.
The Workbench platform is a powerful, comprehensive, easy-to-use environment for engineering simulation.
CAD import from all sources, geometry cleanup, automatic meshing, solution,
parametric optimization, result visualization, and comprehensive report generation
are all available within a single fully interactive modern graphical user environment.
To run ANSYS LS-DYNA in batch mode, you can utilize/modify the default ansysdyna.pbs script and execute it via the qsub command:
To run ANSYS LS-DYNA in batch mode, you can utilize/modify the default `ansysdyna.slurm` script
and execute it via the `sbatch` command:
```bash
```bash
#!/bin/bash
#!/bin/bash
#PBS -l select=5:ncpus=128:mpiprocs=128
#SBATCH --nodes=5 # Request 5 nodes
#PBS -q qprod
#SBATCH --ntasks-per-node=128 # Request 128 MPI processes per node
#PBS -N ANSYS-test
#SBATCH --job-name=ANSYS-test # Job name
#PBS -A XX-YY-ZZ
#SBATCH --partition=qcpu # Partition name
#SBATCH --account=PROJECT_ID # Account/project ID
#SBATCH --output=%x-%j.out # Output log file with job name and job ID
#SBATCH --time=04:00:00 # Walltime
#!change the working directory (default is home directory)
#!change the working directory (default is home directory)
#cd <working directory>
#cd <working directory>
DIR=/scratch/project/PROJECT_ID/$PBS_JOBID
DIR=/scratch/project/PROJECT_ID/$SLURM_JOB_ID
mkdir-p"$DIR"
mkdir-p"$DIR"
cd"$DIR"||exit
cd"$DIR"||exit
...
@@ -24,23 +37,22 @@ echo Running on host `hostname`
...
@@ -24,23 +37,22 @@ echo Running on host `hostname`
echo Time is `date`
echo Time is `date`
echo Directory is `pwd`
echo Directory is `pwd`
echo This jobs runs on the following processors:
echo This jobs runs on the following processors:
echo`cat$PBS_NODEFILE`
echo$SLURM_NODELIST
#! Counts the number of processors
#! Counts the number of processors
NPROCS=`wc-l < $PBS_NODEFILE`
NPROCS=$(scontrol show hostname$SLURM_NODELIST | wc-l)
echo This job has allocated $NPROCS nodes
echo This job has allocated $NPROCS nodes
ml ANSYS/21.1-intel-2018a
ml ANSYS/2023R2-intel-2022.12
#### Set number of processors per host listing
#### Set number of processors per host listing
#### (set to 1 as $PBS_NODEFILE lists each node twice if :ppn=2)
procs_per_host=1
procs_per_host=1
#### Create host list
#### Create host list
hl=""
hl=""
for host in`cat$PBS_NODEFILE`
for host in$(scontrol show hostname$SLURM_NODELIST)
do
do
if["$hl"=""]
if["$hl"=""]
then hl="$host:$procs_per_host"
then hl="$host:$procs_per_host"
else hl="${hl}:$host:$procs_per_host"
else hl="${hl}:$host:$procs_per_host"
fi
fi
...
@@ -51,9 +63,10 @@ echo Machines: $hl
...
@@ -51,9 +63,10 @@ echo Machines: $hl
ansys211 -dis-lsdynamppi=input.k -machines$hl
ansys211 -dis-lsdynamppi=input.k -machines$hl
```
```
The header of the PBS file (above) is common and the description can be found on [this site][1]. [SVS FEM][b] recommends to utilize sources by keywords: nodes, ppn. These keywords allows addressing directly the number of nodes (computers) and cores (ppn) utilized in the job. In addition, the rest of the code assumes such structure of allocated resources.
[SVS FEM][b] recommends to utilize sources by keywords: nodes, ppn.
These keywords allows addressing directly the number of nodes (computers)