parallel compute but can't use load to read data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
0 commentaires
Réponses (2)
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
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.
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
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')".
Voir également
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!