#!/bin/sh
#Ask for 32 processors
#BSUB -n 32
#32 processors per node
#BSUB -R "span[ptile=32]"
# Wallclock time in HH:MM
#BSUB -W 72:00
# Job name
#BSUB -J "MyLargeParallelJob"
# Requires 500M of memory per MPI task
#BSUB -R "rusage[mem=127000]"
# Output and error files
#BSUB -o lsf%J.o
#BSUB -e lsf%J.e
# Transform the LSB_HOSTS into a CST nodefile. Replace the installation path etc. with the settings appropriate to your system.
echo "# CSTMachineFile 20080509" > cst_nodefile
echo "# DefaultInstallationFolder /apps/CST/Studio_Suite/2011_ihpc" >> cst_nodefile
echo "# DefaultTempFolder /scratch/ihpc/ihpcmark/cst_trial" >> cst_nodefile
echo "# DefaultMachineArchitecture Linux AMD64" >> cst_nodefile
# Define our variables here
MACHINEFILE=mymacs.$LSB_JOBID
# Need to make our own machinefile
for i in `echo $LSB_HOSTS`
do
echo $i
done > $MACHINEFILE
# Write node information we got from LSF into cst_nodefile. Each node should be listed only once.
cat $MACHINEFILE | sort | uniq >> cst_nodefile
export I_MPI_FABRICS=tcp
unset I_MPI_ROOT
export CST_VERBOSE_FRONTEND=1
"/apps/CST/Studio_Suite/2011_ihpc/cst_design_environment" -m -r \
-withmpi -machinefile=/scratch/ihpc/ihpcmark/cst_trial/cst_nodefile \
"/scratch/ihpc/ihpcmark/cst_trial/horn.cst"