Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced jobscripts #12

Open
heatherkellyucl opened this issue Jul 22, 2019 · 0 comments
Open

Advanced jobscripts #12

heatherkellyucl opened this issue Jul 22, 2019 · 0 comments

Comments

@heatherkellyucl
Copy link
Collaborator

Possibly should put these in an advanced jobscripts section?

Useful environment variables that can be used in more complicated scripts

Eg $SGE_O_WORKDIR, $JOB_ID, $SGE_TASK_ID, $NSLOTS, $NHOSTS

The reusable jobscript where the input files are passed in on the command line:

qsub -v infile=`pwd`/myMatlabJob.m,addinfiles=`pwd`/initialise.m:`pwd`/analyse.m run-matlab.sh

where the script does

cp $infile .
Matlab_infile=`basename $infile`
for file in `echo $addinfiles | tr ':' ' '` 
do
  cp $file .
done

matlab -nosplash -nodesktop -nodisplay < $Matlab_infile

Submitting a chain of jobs with dependencies

Getting the job ID at submit time so it can be passed on to the next. qsub -terse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant