I actually made a python wrapper, but that does not seem to be working. Do you have any idea as to why that may be (it is just I find Python easier to work with as I use it daily)?
#!/usr/bin/env python
import csv, subprocess
parameter_file_full_path = "/rds/general/user/fk4517/home/myfiles/job_params.csv"
jobid = 0;
with open(parameter_file_full_path, "rb") as csvfile:
reader = csv.reader(csvfile)
for job in reader:
print(job)
qsub_command = "qsub -v"
qsub_command += " NODES={},".format(int(job[0]))
qsub_command += "CORES={},".format(job[1])
qsub_command += "PROCESSES={},".format(job[2])
qsub_command+= "MEM={},".format(job[3])
qsub_command+= "NAME={},".format(job[4])
qsub_command+= "ROWS={},".format(job[5])
qsub_command+= "COLS={},".format(job[6])
qsub_command+= "MAX_T={},".format(job[7])
qsub_command+= "PROB={}".format(job[8])
qsub_command+= " template.sh env".format(jobid)
command = qsub_command.format(*job)
print(command) # Uncomment this line when testing to view the qsub command
# Comment the following 3 lines when testing to prevent jobs from being submitted
exit_status = subprocess.call(command, shell=True)
if exit_status is 1: # Check to make sure the job submitted
print "Job {} failed to submit".format(command)
print "Done submitting jobs!"
Thanks adarsh - I basically made a python script that wrote to a pbs file and submitted individually - thank you for your guidance as I based it off the original bash script you wrote.