Reputation: 21
I'm setting up a small windows cluster for parallel speedup of my Julia code (2x32 cores).
I have following questions:
This code loading on the remote machines is even more annoying as the PyPlot (and any other package) fails to populate help database by giving following error message: (actually a lot of errors from every worker)
exception on : 1: 1ERROR: opening file C:\Users\phlavenk\AppData\Local\Julia-0.3.6\bin/../share/julia\helpdb.jl: No such file or directory
Running on Julia 3.6/ x64 / Windows7, identical directory structure and versions everywhere.
My addprocs command is following:
addprocs(machines,
sshflags=`-i c:\\cygwin64\\home\\phlavenk\\.ssh\\id_rsa`,
dir=`/cygdrive/c/Users/phlavenk/AppData/Local/Julia-0.3.6/bin`,
tunnel=true)
Thank you very much for your advice
Upvotes: 2
Views: 240
Reputation: 91
You could sequence the statements in this order:
using PyPlot
using ModuleNeededOnMasterProcessOnly
addprocs(...)
using ModuleNeededOnAllProcesses
Upvotes: 0
Reputation: 181
"using" causes a module to be loaded on all the processes. To load a module on a specific machine you use "include". e.g.
if myid()==1
include("/home/user/.julia/PyPlot/src/PyPlot.jl")
end
You can then do your plotting by
PyPlot.plot(...)
on your local machine.
Upvotes: 1