Upload files to Matlab cluster

3 Ansichten (letzte 30 Tage)
paul_dak
paul_dak am 17 Jun. 2021
Kommentiert: paul_dak am 20 Jun. 2021
Hi Everyone!
Im using matlab cluster (AWS based). my code uses local folders and openes large amount of data from local muchine (~3 GB, of 10K files). All files are on Matlab Drive (synced), but for some reason i cant get the cluster to read them - it doesnt recognize their path.
The option of uploading them at the cluster properties is not relevant (taeks forever).
Any ideas?
attached is a scheme of my code
c = parcluster;
parpool(c)
my_folder = ...
'D:\MATLAB_Drive\new_folder\test_files\';
parfor i = 1: table_length
%tries to access files ffrom my_folder - cant do it...

Antworten (1)

Walter Roberson
Walter Roberson am 17 Jun. 2021
Im using matlab cluster (AWS based)
What operating system is the AWS running? My understanding is that AWS clusters are mostly Linux based
my_folder = ...
'D:\MATLAB_Drive\new_folder\test_files\';
A Windows file name would not work on a linux system.
It would be safer to use the matlabdrive() function together with fullfile():
my_folder = fullfile(matlabdrive, 'new_folder', 'test_files');
  5 Kommentare
Raymond Norris
Raymond Norris am 18 Jun. 2021
This is a good example that we often talk to folks about when running elsewhere. How best to write your code so that, within reason, you can rehost your code on another machine with no changes.
For example, how would you expand on the above example? Do you ensure that my_folder exists? Should it? If it doesn't, do you throw an error immediately (because you were expecting files in it) or do you create it because you'll need to write files to it? The sooner you address this, the easier it will be to debug issues when they do arise.
paul_dak
paul_dak am 20 Jun. 2021
yeah, it is very important, i will pay more attention next time.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by