#!/bin/bash -l #SBATCH --job-name=my-soft #SBATCH --nodes=1 #SBATCH --ntasks-per-node=32 #SBATCH --mem=120G #SBATCH --time=12:00:00 #SBATCH --constraint=skylake #SBATCH --output my-soft-job_%j.out #SBATCH --error my-soft-job_%j.err #SBATCH --mail-user=myemail@....uni-hannover.de #SBATCH --mail-type=BEGIN,END,FAIL # Change to work dir cd $SLURM_SUBMIT_DIR # Load modules module load my_necessary_modules # install software if the executable does not exist [ -e "$HOME/sw/$ARCH/my-soft/3.1/install/bin/my-soft.exe" ] || { mkdir -p $HOME/sw/$ARCH/mysof/3.1/{build,install} tar -zxvf $HOME/sw/source/my-soft-3.1.tgz -C $HOME/sw/$ARCH/my-soft/3.1/build cd $HOME/sw/$ARCH/my-soft/3.1/build ./configure --prefix=$HOME/sw/$ARCH/my-soft/3.1/install make make install } # run my_soft export LD_LIBRARY_PATH=$HOME/sw/$ARCH/my-soft/3.1/install/lib:$LD_LIBRARY_PATH srun $HOME/sw/$ARCH/my-soft/3.1/install/bin/my-soft.exe --input file.input