I am currently writing a python script to launch many simulations in parallel using this command repeatedly :
os.system("bsub -q reg -app ... file.cir")
And I need to retrieve the job ID list in order to know exactly when all the jobs are completed, to then process the data. My idea is simply to make a loop over the job id list and to check if each of them are completed.
I have tried using getpid() but I believe it only gives me the id of the python process running. I know bjobs gives you the list of processes running but from there I do not see how to parse the output with my Python file.
How can I do that ? Would there otherwise be an easier solution to find out when all the processes I run on the LSF cluster are over ?