What would be the best way to enclose a function inside of a module that 
fires up additional worker processes, where each worker process also sees 
the module?

Normally, if starting julia with `julia -p N`, I'd use an `@everywhere 
using MyModule`, but this doesn't work here because the other processes 
aren't started until after the `using` statement has been executed.

I need the `using` statement to access the function that starts the 
workers, so I can't wait to execute it until after the `addprocs()` call. 
 I also want the code to intelligently decide how many workers to start for 
a given run, rather than relying on a fixed number supplied by the user.

Any tips or advice would be greatly appreciated.

-D

Reply via email to