... | @@ -45,4 +45,27 @@ To unload a module: |
... | @@ -45,4 +45,27 @@ To unload a module: |
|
#!sh
|
|
#!sh
|
|
$ module unload R/3.0.2
|
|
$ 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
|
|
|
|
```
|
|
|
|
|