How can I use a new toolbox when using MDCS?

1 visualización (últimos 30 días)
Pegah Hosseini
Pegah Hosseini el 4 de Sept. de 2012
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

Respuestas (2)

Jason Ross
Jason Ross el 4 de Sept. de 2012
Editada: Jason Ross el 4 de Sept. de 2012
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
Pegah Hosseini el 4 de Sept. de 2012
Dear Jason,
I did what you told but I still have the same problem. I went to Parallel>manage configurations> Iridis (which is the configuration I am using)> double click on Iridis
Then another window opened which had three tabs scheduler, jobs, tasks. In the "jobs" tab, there were two windows for FileDependencies and PathDependencies and I added the path to this toolbox to both of these windows. I even added all the subfolders of this toolbox but still I get the same error.
"Undefined function or variable SPM for input argument type 'char'."
Best, Pegah
  7 comentarios
Pegah Hosseini
Pegah Hosseini el 5 de Sept. de 2012
I have installed Secure Shell Client (SSH) on my computer and through that, which is a linux environment, I connect to iridis account and for that I have to enter a username (pth1v10 as you can see in the save path above) and password. Through this SSH, I will call MATLAB which is actually being called from one of the cluster nodes as I explained before. So, when I work in this MATLAB session, I am actually working on one of the nodes and now I have to submit my job through MDCS.
Although my previous suggestion (adding all paths using job.PathDependencies) seems a bit strange, I did it anyway and now it identifies SPM and it seems that it is actually working now.
Jason Ross
Jason Ross el 5 de Sept. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Cluster Configuration en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by