<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Dear Developers,</div>
<div>I have been working on a piece of code development that need your sincere help (three code file attached here).</div>
<div><br>
</div>
<div>I use run_slurm.py to use python subprocess module to submit multiple jobs to slurm cluster by invoking a sbatch file with a for loop to reach the following target:</div>
<div><br>
</div>
<div>1) create some environmental variables for job_slurm.py to run simulations (values of these environmental variables will change for each job with the for loop)</div>
<div><br>
</div>
<div>2) invoke submit_slurm.sh to submit a sbatch job that will run job_slurm.py</div>
<div><br>
</div>
<div>3) each job_slurm.py will use python multiprocess.Pool to run parallized simulations on each ./mod_bart.sh exeutable file (will run for a few hours) on a single compute node in cluster using all cores of this compute node</div>
<div><br>
</div>
<div>I get the following error all the time, could you provide some insights on how our implementation is wrong to achieve the desired goal:</div>
<div><br>
</div>
<div><br>
</div>
<div>Exception in thread Thread-3:</div>
<div>Traceback (most recent call last):</div>
<div>  File "/share/apps/python/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner</div>
<div>    self.run()</div>
<div>  File "/share/apps/python/2.7/lib/python2.7/threading.py", line 505, in run</div>
<div>    self.__target(*self.__args, **self.__kwargs)</div>
<div>  File "/share/apps/python/2.7/lib/python2.7/multiprocessing/pool.py", line 347, in _handle_results</div>
<div>    task = get()</div>
<div>TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())</div>
<div><br>
</div>
<br>
<p></p>
</div>
</body>
</html>