How can I use a new toolbox when using MDCS?
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
Jason Ross
2012-9-4
编辑:Jason Ross
2012-9-4
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.
0 个评论
Pegah Hosseini
2012-9-4
7 个评论
Jason Ross
2012-9-5
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Parallel Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!