is there a way to change the default ClusterManager in multi.jl

181 views
Skip to first unread message

rpd

unread,
Aug 2, 2013, 1:23:43 AM8/2/13
to julia...@googlegroups.com
is there a way to change the default ClusterManager in multi.jl?

I know that one can pass ClusterManager as a keyword argument to addprocs. But, if none is passed, as default RegularCluster is being used. I would like to replace the default with another one which I can possible configure while starting in julia.rc or as an environment variable.

--Dinu



Amit Murthy

unread,
Aug 2, 2013, 4:02:10 AM8/2/13
to julia...@googlegroups.com
Currently no.

But I don't understand your requirement exactly. If you want to support an entirely new type of cluster, you would need to write your own ClusterManager anyways. 

You can have your own wrapper around addprocs. Depending upon your  julia.rc or env variable you canl either call the regular addprocs or call it with your cluster manager. 

What new type of cluster do you want to provide support for? 

rpd

unread,
Aug 2, 2013, 10:05:27 AM8/2/13
to julia...@googlegroups.com
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

Amit Murthy

unread,
Aug 2, 2013, 11:52:52 AM8/2/13
to julia...@googlegroups.com
The right thing to do, of course, is to fix the issues you are facing on Windows. Could you please file an issue on Github regarding this? 

As for the dependency injection bit, I am not aware as to how you can do that. Maybe others on this list can confirm if it is possible or not.

Amit Murthy

unread,
Aug 4, 2013, 8:17:01 AM8/4/13
to julia...@googlegroups.com
Created - https://github.com/JuliaLang/julia/issues/3935


On Friday, 2 August 2013 21:22:52 UTC+5:30, Amit Murthy wrote:
The right thing to do, of course, is to fix the issues you are facing on Windows. Could you please file an issue on Github regarding this? 

As for the dependency injection bit, I am not aware as to how you can do that. Maybe others on this list can confirm if it is possible or not.
Reply all
Reply to author
Forward
0 new messages