Changes
Page history
added how to use module load inside you qsub script
authored
Apr 05, 2016
by
Villerius
Show whitespace changes
Inline
Side-by-side
EnvironmentModules.md
View page @
05eb67e6
...
...
@@ -45,4 +45,27 @@ To unload a module:
#!sh
$ module unload R/3.0.2
## Use environment modules with qsub script
If you want to use the modules command within a script that you want to submit with qsub
you need to source /usr/local/Modules/current/init/bash.
A example script that you would submit would look like this:
```
#!/bin/bash
#$ -S /bin/bash
#$ -q all.q
#$ -N my_first_job
#$ -l h_vmem=1G
#$ -cwd
#$ -j Y
#$ -V
#$ -m be
#$ -M email@address.lumc
.
/usr/local/Modules/current/init/bash
module load R/3.2.3
R CMD BATCH test.R
```