Nastran
Nastran is available on the CAC Linux clusters in both serial and distributed memory parallel (DMP) solvers. To use Nastran run:
module load nastranThis will set up the environment necessary to use the Nastran tools and solvers on the cluster.
Ex: #PBS -l nodes=5:ppn=2,walltime=24:00:00
A sample serial script follows:
#!/bin/sh
#PBS -N ser.nastran
#PBS -M uniquename@umich.edu
#PBS -m bae
#PBS -l nodes=1:ppn=1,walltime=4:00:00
#PBS -q route
#PBS -V
echo " i ran on :"
cat $PBS_NODEFILE
WORKDIR=/tmp/$PBS_JOBID
mkdir -p $WORKDIR
echo $WORKDIR
#copy inputs, you also need to copy any INCLUDE files
#in your .dat file. We do that here by using the wild card *
cp ~/inputs/sq_truss_continuum* $WORKDIR/
#move to WORKDIR
cd $WORKDIR
nastran batch=no sq_truss_continuum_fra_BOLT.dat
#copy results back
mkdir -p ~/outputs/
cp $WORKDIR/outputs.file ~/results/
rm -rf $WORKDIR
A DMP (MPI) job is simmilar. Nastran is smart enough to copy your .dat file to all nodes in the job but not any INCLUDE files. Thus the following sample script is more complicated.
#!/bin/shYou should edit both scripts to match your input names, any INCLUDE files and the resources you wish to use. You should also edit your email address. You can view other nastran options by running:
#PBS -N mpi.nastran
#PBS -M uniquename@umich.edu
#PBS -m bae
#PBS -l nodes=5:ppn=2,walltime=4:00:00
#PBS -q route
#PBS -V
echo " i ran on :"
cat $PBS_NODEFILE
WORKDIR=/tmp/$PBS_JOBID
mkdir -p $WORKDIR
#move to WORKDIR
cd $WORKDIR
#find the number of nodes
CPUS=`cat $PBS_NODEFILE | wc -l`
#make the node list for nastran
for x in `cat $PBS_NODEFILE`
do
NODES=$NODES:$x
done
#make scratch on all nodes copy inputs
for x in `cat $PBS_NODEFILE | uniq`
do
/usr/bin/ssh $x mkdir -p $WORKDIR
#all needed inputs start with the letters sq
#
/usr/bin/scp $HOME/hypermesh/sq* $x:$WORKDIR
done
#edit for which .dat to run
nastran batch=no hpmpi=yes hosts=$NODES dmparallel=$CPUS sq_truss_continuum_fra_BOLT.dat
#make results directory in /home
mkdir -p ~/outputs
cp $WORKDIR/* ~/outputs/
rm -rf $WORKDIR
nastran -o help all
If you have any questions contact us at cac-support@umich.edu.
