Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


No Format
#PBS -j oe
#PBS -m ae
#PBS -N JobName2
#PBS -l walltime=3:00:00
#PBS -l select=1:ncpus=8:mem=32gb

shopt -s expand_aliases
source /etc/profile.d/
echo "Job identifier is $PBS_JOBID"
echo "Working directory is $PBS_O_WORKDIR"

mkdir -p /fast/jc012345/myjobs
cp -a myjob1.m myjob2.m myjob3.m myjob4.m myjob5.m myjob6.m myjob7.m myjob8.m /fast/jc012345/myjobs/
pushd /fast/jc012345/myjobs

module load matlab
matlab -r myjob1 &
matlab -r myjob2 &
matlab -r myjob3 &
matlab -r myjob4 &
matlab -r myjob5 &
matlab -r myjob6 &
matlab -r myjob7 &
matlab -r myjob8 &
wait    # Wait for background jobs to finish.

cp -a out1.mat out2.mat out3.mat out4.mat out5.mat out6.mat out7.mat out8.mat $PBS_O_WORKDIR/
rm -rf /fast/jc012345/myjobs

Do not remove the /fast/jc012345  directory.

Brief Details on some extra PBS/Torque directives