<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br><br>---------- Weitergeleitete Nachricht ----------<br>From: Dave Angel <<a href="mailto:d@davea.name">d@davea.name</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Cc: <br>Date: Thu, 10 Jan 2013 00:56:20 -0500<br>
Subject: Re: subprocess.Popen and multiprocessing fails to execute external program<br>On 01/09/2013 11:08 PM, Niklas Berliner wrote:<br>
> I have a pipline that involves processing some data, handing the data to an<br>
> external program (t_coffee used for sequence alignments in bioinformatics),<br>
> and postprocessing the result. Since I have a lot of data, I need to run my<br>
> pipeline in parallel which I implemented using the multiprocessing module<br>
> following Doug Hellmanns blog (<br>
> <a href="http://blog.doughellmann.com/2009/04/pymotw-multiprocessing-part-1.html" target="_blank">http://blog.doughellmann.com/2009/04/pymotw-multiprocessing-part-1.html</a>).<br>
><br>
> My pipeline works perfectly fine when I run it with the multiprocessing<br>
> implementation and one consumer, i.e. on one core. If I increase the number<br>
> of consumers, i.e. that multiple instances of my pipeline run in parallel<br>
> the external program fails with a core dump.<br>
><br>
<br>
Could it be that the external program is not designed to have multiple<br>
simultaneous instances?  There are many such programs, some of which<br>
check for an existing process before allowing another one to get far.<br>
<br>
When using the multiprocessing module, always make sure your externals<br>
are well-behaved before looking for problems in your multi-code.<br>
<br>
To put it more strongly, a well-written program cannot easily be crashed<br>
by the parent that launched it.<br>
<br>
<br>
--<br>
<br>
DaveA<br>
<br></blockquote><div><br><br>Hi Dave,<br><br>the developers of the external program said that they are using the program with multiple simultaneous instances. Also, when I execute multiple simultaneous instances of the external program using a bash wrapper script on my machine it works (the same wrapper scripts that fail when executed through python).<br>
Before asking here I have contacted the developers of the external program but they couldn't help me any further.<br><br>Cheers,<br>Niklas<br></div></div>