Submit multiple jobs in PBS script

22 Views Asked by At
#!/bin/sh
#PBS -N parallel_cache
#PBS -W umask=022
#PBS -o output.out
#PBS -e err.err
#PBS -l select=1:ncpus=2:mem=20gb
#PBS -l walltime=24:00:00
#PBS -l cput=120:00:00
#PBS -m abe
#PBS -J 1-2

module load mathematica/13.3

cd $PBS_O_WORKDIR

l=(1 2)
d=(3 3)
p=(5 5)

for deriv in $(seq 0 ${d[$i]})
do
    math -script Testcalc.m ${l[$i]} $deriv ${p[$i]} &
    wait
done

I want to change the PBS script to make it do the following. It is supposed to submit two jobs parallely. There are 3 variables l, d, & p each with two elements. The first job is supposed to take the first element and the second job should take the second element respectively.

But in each job the element of d is looped over from 0-3 or 0-dvalue. For each d value it will do a serial computation using math -script .... The serial jobs are dependent on each other while the parallel jobs are independent of each other. I don't understand how to modify the PBS script to achieve this. As of now it is submitting jobs serially.

0

There are 0 best solutions below