in reply to parallelisation (how to wait on N threads)
in thread Parallelization of heterogenous (runs itself Fortran executables) code
David,
Could you please elaborate on the implications of mixing fork() with Perl threads?
I'd like to know what the pitfalls are. While it's clear that threads are redundant (system()/fork() already allows the processes to run in parallel) Jochen's approach still seems natural to me. Starting four threads from the main proccess allows you to limit how many processes you are running at once and to use four identical workers to handle the input/output to each fortran executable.
If it's best to avoid mixing fork() (from the system() calls) and Perl threads, what would you suggest for Jochen's situation? Using only system() calls to fork from the main process while the main loop maintains a count to be sure no more than four run at once?
Cefu
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parallelisation (how to wait on N threads)
by erroneousBollock (Curate) on Nov 20, 2007 at 13:38 UTC |