#!/bin/bash #----------------------------------------------------------------- # Template script for serial jobs to run on SGE cluster. # Modify it for your case and submit to SGE with # command "qsub batch_run.sh". # You may want to modify the parameters for # "-N" (job queue name) # #------- Attention: #$ is a special SGE symbol, not a comment ------ # Give a name to your job (for example, run-on-mphase): #$ -N my_run # # Specify the kind of shell script you use, for example, bash #$ -S /bin/bash # # Standard output and error files: #$ -o stdo.output #$ -e stderr.output # # Start this script from the current working directory: #$ -cwd # Specify the current working directory: CDIR=`pwd` # Specify the name of your executable, for example, "mycode.x" myjob=mycode.x # Specify a local temporary directory on the running node: TMPD=/tmp/$LOGNAME/$JOB_ID this_node=`/bin/uname -n` echo "TMPD is $this_node:$TMPD" mkdir -p $TMPD # Copy you compiled executable into $TMPD directory # along with the input files and run it from there: cp $myjob $TMPD cd $TMPD $TMPD/$myjob # Copy the results back into CDIR: cp $TMPD/results.dat $CDIR # Clean TMPD cd /tmp rm -rf $TMPD |
![]() | ![]() | ![]() |