arunreddy
7/27/2017 - 1:22 AM

example.sh

example.sh

#!/bin/ bash

# VAR1=$1
# VAR2=$2
# VAR3=$3

python example.py ${VAR1}  ${VAR1}  ${VAR1} 
------------------------------------------------------------------------------------
Inside the python file.

import sys

var_1 = sys.argv[1]
var_2 = sys.argv[2]
var_3 = sys.argv[3]

-------------------------------------------------------------------------------------
job_runner.sh

#!/bin/bash
#  P1 params: P11 P12 P13
#  P2 params: P21 P22 P23
#  P3 params: P31 P32 P33

for P1 in "P11 P12 P13"
 # Seperated by space
do
    for P2 in "P21 P22 P33"
    do
        for P3 in "----"
        do
            qsub -v VAR1="${P1}" VAR2="${P2}" VAR3="${P3}" example.sh
        done
     done
done