#!/bin/bash source /etc/profile.d/modules.sh module load matlab #OAR -l core=10,walltime=6:00:00 #OAR -O /temp_dd/igrida-fs1/mylogin/log/job.%jobid%.output #OAR -E /temp_dd/igrida-fs1/mylogin/log/job.%jobid%.error echo "My job was ran on these nodes:" cat $OAR_NODEFILE #Setup MCR cache directory locally export MCR_CACHE_ROOT=/tmp/mcr_cache_${USER}_OAR_JOBID_${OAR_JOBID} mkdir -p $MCR_CACHE_ROOT #cd to your execution directory first cd /udd/mylogin/matlab-igrida matlab -r matlab-demo #Remove temporary MCR cache directory /bin/rm -rf $MCR_CACHE_ROOT