I understand that I need to write my own ClusterManager. What I would like to do is to set this as the default, so that when addproc is called either from a script or when I launch julia with -p option, my ClusterManager is used and not the standard one.
I do not have in mind integration with a particular cluster manager. I faced difficulties on my machine (Win 7) with the the whole multiprocessing stuff. If I start julia with -p 2, it would hang. If type addproc(1) it would hang. I dug into the reason and saw that in my machine, detach does not work; meaning once a cmd is set be detached, it would not run.It always returns an error code 0x400..05 (I do not remember how many zeros where there). Once I patched the file multi.jl removing detached, I started getting crashes.Once I type addproc(1) julia would crash with an error in libuv code (req-inl.h #220) something about unrecognized request type. After some experiments, I saw that if I pipe the julia worker to tee, I do not get the error any longer. I managed to create a module with all these patches so as not to modify multi.jl with an own ClusterManager and with an own add_proc function that uses it.
Give this situation, I thought,i would rather use my version all the time. But, I do not want to use MyModule.addproc all the time. I would rather use addproc and it should pick up my ClusterManager. This is a sort of dependency injection. Any suggestions on how I could do that? I guess I will have to replace the addproc method with my own. How would I do that? Or perhaps i should do something else.
-Dinu