...
A basic batch script for Comsol, that runs on the cpu-compute-long queue, asking for 32 CPU cores and 64GB of RAM:
#BSUB -N
#BSUB -R '(!gpu)'
#BSUB -n 32
# embedded options to bsub - start with #BSUB # -- job name --- #BSUB -J Com_wrench_par_shared # -- Notify me by email when execution begins -- #BSUB -B # -- Notify me by email when execution ends -- #BSUB -N # -- email address -- # please uncomment the following line and put in your e-mail address, # if you want to receive e-mail notifications on a non-default address ##BSUB -u your_email_address # -- estimated wall clock time (execution time), commented out by default.
# LSF will kill jobs with this setting at the specified time ##BSUB -W 4:00 ### -- specify that we need 64GB of memory -- #BSUB -R "rusage[mem=6464GB]"
# -- parallel environment requests: 32 cores -- #BSUB -o Output_%J.out #BSUB -e Error_%J.err
#BSUB -J comsolJob
n 32 ### -- specify that the cores MUST BE on a single host! It's a SMP job! -- #BSUB -R "span[hosts=1]"
#BSUB -q cpu-compute-long ### -- Specify the output and error file. %J is the job-id -- ### -- -o and -e mean append, -oo and -eo mean overwrite -- #BSUB -o Output_%J.out #BSUB -e Error_%J.err
module add comsol
mkdir /scratch/long/$USER.$LSB_JOBID
comsol batch -np 32 -inputfile wrench.mph -outputfile wrench_out.mph -tmpdir /scratch/long/$USER.$LSB_JOBID -recoverydir /scratch/long/$USER.$LSB_JOBID
...