Created
June 17, 2014 07:46
-
-
Save skaae/a175b09655777d6b96a3 to your computer and use it in GitHub Desktop.
Launch script for matlab with GPU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# stdout/stderr redirection | |
#PBS -N NAME_OF_JOB1 | |
#PBS -o $PBS_JOBNAME.$PBS_JOBID.out | |
#PBS -e $PBS_JOBNAME.$PBS_JOBID.err | |
#PBS -l nodes=1:gpus=1 | |
# Execute the job from the current working directory | |
cd $PBS_O_WORKDIR | |
ML_GPUDEVICE=`sed 's/^.*gpu//' $PBS_GPUFILE` | |
export ML_GPUDEVICE | |
echo -n gpu${ML_GPUDEVICE}@ | |
/bin/hostname | |
matlab -nodisplay -logfile test.out -r "gpuDevice(str2num(getenv('ML_GPUDEVICE')) + 1); myscript" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to run the script through the dtu server system
For debugging GPU code you can run matlab in desktop mode by: