Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To use the container, we’d simply call the binary we left in there, referencing the container wherever it resides:

apptainer run svFSIplus/project/engineering/svfsiplus/svfsiplus.sif svFSIplus svFSI.xml

Or, since svFSIplus uses OpenMPI for multicore:

apptainer run svFSIplus/project/engineering/svfsiplus/svfsiplus.sif mpirun -n 32 svFSIplus svFSI.xml

...

That same executable line can be used in job script submissions in place of however you’d usually run your executable. That holds true for compiled binaries, or containerized Python environments, or most everything else.

Sample Job File

Code Block
#BSUB -o svfsiplus.%J
#BSUB -N
#BSUB -J svFSIplusJob
#BSUB -R '(!gpu)'
#BSUB -R "span[hosts=1]"
#BSUB -R "rusage[mem=128]"
#BSUB -q cpu-compute
#BSUB -n 32

apptainer run /project/engineering/svfsiplus/svfsiplus.sif mpirun -n $LSB_DJOB_NUMPROC svFSI.xml

The above file runs a job that:

  • Puts output in a file name svfsiplus.123456, where 123456 is the job number assigned (-0)

  • Sends an email when the job is done (-N)

  • Names the job svFSIplusJob in “bjobs” output (-J)

  • Selects a node with 128GB of available RAM, avoiding hosts with GPUs and keeping all the slots on a single host (-R)

  • Selects a node on the cpu-compute queue (-q)

  • Selects a node with 32 free cores (-n)

It uses the environment variable $LSB_DJOB_NUMPROC so that you only have to change the number of cpu slots requested in one place, at the top of the file in the #BSUB -n line.