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!