Thanks Chris. Yes, multiprocessing is great on my i7. :-)

Actually the bug I reported was "usfm2osis.py enters infinite loop". The bug that was fixed was something like "\periph USFM doesn't process properly".

I don't think it really needs a new bug report. To debug and fix the main issue, simply roll-back (temporarily) yesterday's fix to the processing of the \periph element. Then using my provided minimal test file or something similar, get the program to terminate properly with a suitable error message. Then redo the \periph fix and hopefully any other USFM processing shortcomings will also benefit from a more helpful output. (I can probably try to do this myself on the weekend sometime if it's not fixed by then, but I think your Python skills are way ahead of mine.)

Meanwhile "ctrl+C" or "ps xa | grep usfm2osis" and "halt" are my friends, unfortunately.

Thanks,
Robert.


On 22/05/13 23:05, Chris Little wrote:
On 5/22/2013 3:26 AM, Robert Hunt wrote:
Yes, it seems that Chris did indeed fix the script so that my supplied
minimal test case no longer causes the program to require a manual halt.
:-)

Unfortunately though, processing of that particular USFM field wasn't my
main issue. The main issue seems to be that the program does not fail
gracefully if a processing fault is hit in the USFM to OSIS conversion.

Indeed... I only fixed the bug that you reported, not the bug you didn't report. ;)  If you can provide a bug report with some input that predictably produces erroneous output or gets stuck, I can fix the bug.

So I still have to manually halt the script to try to track down the
next USFM processing error. (I suspect the main problem that I'm
concerned about is in the multiprocessing aspect of the script.)

I'm not sure what could concern you about a multithreaded application. In this case, the script gives each USFM file to a separate thread for processing and does them in parallel, attempting to keep all of your processor's logical cores fully utilized. You can always turn multithreading off (i.e. set the thread count to 1), but it really won't change anything other than the running time.
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to