How can I use a new toolbox when using MDCS?
Mostra commenti meno recenti
Hi,
I am using Statistical Parametric Mapping (SPM) toolbox. I have to submit my job through MDCS to a cluster. I have asked the admin to add SPM to the MATLAB on the node. So they put it in the system and told me to add its path to the MATLAB session that opens on my own PC from the cluster node.
1. I did this the first time using file menu> set path and it asked where to save pathdef. I saved pathdef.m in a folder other than the one my data is in. So, everytime I closed my MATLAB session and opened it again, I had to add the path. Also, although the path was added to my session and I could call SPM in this open session, when I submitted my job to MDCS, it could not find SPM and gave me this error back: "Undefined function or variable 'spm'."
2. Then I tried adding the path using addpath function and saved pathdef.m inside the folder my data is in and when I closed the session and opened it again, SPM was there and I did not need to add it again but my second problem was not solved, i.e. I still get this error when I submit my job to MDCS: "Undefined function or variable 'spm'."
I asked the admin to add its path himself to all cluster nodes (I am not even sure if it is a reasonable suggestion) but I have not got any answers for that yet. Any suggestions?
Pegah
Risposte (2)
Jason Ross
il 4 Set 2012
Modificato: Jason Ross
il 4 Set 2012
0 voti
You might need to add it in the cluster profile under AdditionalPaths. Go into the parallel menu, select the cluster profile for your MDCS cluster, edit it, and add the paths to the toolbox in the "AdditionalPaths" field.
Pegah Hosseini
il 4 Set 2012
0 voti
7 Commenti
Jason Ross
il 4 Set 2012
Are the client and cluster nodes the same operating system? Could there be spaces in the paths that aren't being picked up?
Jason Ross
il 4 Set 2012
Also, what's the location where the new toolbox gets installed? It looks like it's a toolbox developed outside of MathWorks, right?
Pegah Hosseini
il 5 Set 2012
Modificato: Pegah Hosseini
il 5 Set 2012
Pegah Hosseini
il 5 Set 2012
Jason Ross
il 5 Set 2012
You mention having an "iridis" account. Is there a separate account where you are doing the addpath/savepath/findResource or is that being done on the "iridis" account? Do you log into the "iridis" account on Windows, or do you have another user name on Windows? (e.g. phosseini)
You mention that you work on Windows, but the addpath looks like it's being done on UNIX. If there are two different user accounts at play here, it's possible that the paths are not being picked up because the settings are being saved in two different home directories.
Do you know how the jobs are being submitted to the scheduler? Do you log into a cluster node or submit right from Windows? Is the scheduler MDCS or is it something else (Torque, LSF, PBS, SGE, etc?)
Pegah Hosseini
il 5 Set 2012
Jason Ross
il 5 Set 2012
It's good to hear that progress is being made!
It sounds like you do have two user IDs at play here, one on your Windows 7 machine and another on the cluster.
When you are looking at the Iridis configuration through Windows (I'm assuming it's type "jobmanager"), is the "pth1v10" username filled in, or is it blank? If it's not, you are likely connecting to the cluster using some other user ID, and therefore it's not finding your home directory (~) and other information.
A quick way you can see what's going on is as follows:
matlabpool Iridis open 1
(an interactive matlabpool should open using the "Iridis" cluster with one worker)
spmd
system('whoami')
end
You should now see which user name is in use. This might offer a clue as to why these changes aren't being picked up on the cluster.
You can also try other MATLAB commands inside the spmd block -- checking your path, seeing if your function are there, etc. Hopefully this will help you get things working correctly.
Categorie
Scopri di più su MATLAB Parallel Server in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!