DoaneAS / rseqc

Automatically exported from code.google.com/p/rseqc
0 stars 0 forks source link

RPKM_count.py run in Ipython parallel never finishes #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Send jobs to RPKM_count.py using
from IPython.parallel import Client
from subprocess import call
from time import sleep
call(["ipcluster","start","--daemonize","--quiet"])
sleep(15)
rc = Client()
lview = rc.load_balanced_view()
lview.block = True
# parallel function to be called
@lview.parallel()
def syscall_wrapper(callstring):
    from subprocess import call
    call(callstring, shell=True)

rseqccalls = list()
rseqccalls.append("RPKM_count.py -i file1 -o file2 -r bedfile -u -e")
rseqccalls.append("RPKM_count.py -i file3 -o file4 -r bedfile -u -e")
syscall_wrapper.map(rseqccalls)

What is the expected output? What do you see instead?
On my server only one job would flush output to the output file and the other 
jobs would just be left hanging and never finish

What version of the product are you using? On what operating system?
CentOS running kernel 2.6.32-358.6.1.el6.x86_64

Please provide any additional information below.
I solved the problem by modifying RPKM_count.py to flush OUT regularly and 
properly calling OUT.close() at the end of main(). I also switched to using 
OUT.write() instead of OUT >> 

I'm attaching the file with my modification.

Original issue reported on code.google.com by miika.ah...@gmail.com on 29 Aug 2013 at 7:46

Attachments: