Effacer les filtres
Effacer les filtres

parallel compute but can't use load to read data

1 vue (au cours des 30 derniers jours)
buaa
buaa le 15 Sep 2011
I succeeded using two computers to parallel.I tested ,it work. But when I use 'load' command in the task function , it didn't work. I checked the task's error message,say unable to read file ,no such file or directory. But I am sure the path is correct.Because I executed it in command windows. By the way,the path is on a network drive.
How can I let the two machines find the correct path?
thank you!

Réponses (2)

Jason Ross
Jason Ross le 15 Sep 2011
It's likely that the user context on the remote system is different and doesn't know what t:\ is. If you execute
[status,result] = system('net use');
in your parallel code, the "result" will have the drive mappings that are known under the user contest the process is using. I'm betting that t:\ doesn't show up there.
Try using the UNC path instead, as it should be accessible without having to go through setting up drive letters.
  2 commentaires
buaa
buaa le 16 Sep 2011
I used
[status,result] = system('net use');
in my parallel code,the 'result' is empty list. Why?
Are the any different between parallel program and common code?
Thank you!
Jason Ross
Jason Ross le 16 Sep 2011
The difference is in that the MATLAB worker is running under a different user context (most likely LocalSystem). Different user contexts in Windows don't share drive letters, so therefore T:\ doesn't make any sense for that process.
Were you able to access the data using UNC? You can try using a "dir" command in the same manner to see if you can get a directory listing.
You could also try running these commands interactively in pmode. I find it a good way to debug issues like this. Just type "pmode open <configname>" at the prompt and you'll be connected to the workers in an interactive fashion.

Connectez-vous pour commenter.


Jan
Jan le 15 Sep 2011
You can insert an "exist(FileName, 'file')" in the code to check this again. But the error message is actually exhaustive enough: MATLAB is sure, that the path is not correct. There are certainly good reasons for this fact.
Check if the network drive is mapped to the same drive letter, UNC path or whatever. Think of spaces in the definition of the path - sometimes these spaces are overseen (see http://www.mathworks.com/matlabcentral/answers/15876-addpath-question). Post the relevant code to get a more specific assistence.
  3 commentaires
buaa
buaa le 15 Sep 2011
Sorry,
function fa=pfft2d()
fa=exist('T:\test\project_20110902\test2\RawImage_test_99_107_115\PreProImage\
PreImage_00001.mat','file');
end
Jan
Jan le 15 Sep 2011
Try "set(Job,'PathDependencies',{'T:\'});" with a trailing file separator. 'T:' is the current path on the T drive, while 'T:\' is the root folder on this drive. Is the network drive mounted correctly and does the user have read permissions in the subfolder? Try "exist('T:\', 'dir')" and "exist('T:\test\project_20110902\test2\RawImage_test_99_107_115\", 'dir')".

Connectez-vous pour commenter.

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by