Skip to content

Instantly share code, notes, and snippets.

@ccarouge
Last active September 18, 2015 04:56
Show Gist options
  • Save ccarouge/c5401a281ff2894202ef to your computer and use it in GitHub Desktop.
Save ccarouge/c5401a281ff2894202ef to your computer and use it in GitHub Desktop.
Using HERE documents with qsub
#!/bin/bash
module load intel-fc/15.0.3.187
module load intel-cc/15.0.3.187
module load openmpi/1.8.8
module load netcdf/4.3.3.1
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
./configure
# -V: to send over all the environment variables, in particular from the modules loaded
# for the configuration.
qsub -V -N wrf_compile << EOF_compile
#!/bin/bash
#PBS -l walltime=1:00:00
#PBS -l mem=5GB
#PBS -l ncpus=4
#PBS -j oe
#PBS -q express
#PBS -l wd
#PBS -l software=intel-cc/2:intel-fc/2
export J="-j \$PBS_NCPUS"
./compile em_real
EOF_compile
@aidanheerdegen
Copy link

Sweet as bro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment