MATLAB 'Gather' on Tall Array Never Terminating

257 Views Asked by At

I am running R2017a on Windows 10, and using a tall array that was constructed off a Datastore object (that was, itself, constructed from tall arrays built on MATLAB matrices of doubles).

What really bugs me about the issue I'm having now is that all my code used to work fine. One day it simply started hanging when I tried to run it.

This is the block in question:

%load
tallTraindat = tall(datastore);
sz = size(tallTraindat);
sz = gather(sz);
numExamples = sz(1);
exampleLen = sz(2);

My tall array is a M x ~1700 single array, constructed on this datastore of smaller single arrays. In a loop:

write(fname,tallEx); % tall ex constructed by tall(someSingles);
folderNames{end+1} = fname;

and then:

ds = datastore(folderNames,'Type','tall');

As you can see, this is about as vanilla as it gets. But the operation 'sz = gather(sz)' simply hangs forever. It never finishes or returns. My parallel pool has started properly, and the gather operation gets to the point where it prints 'Evaluation 100% complete'. But it goes nowhere from there. If I pause execution, I'm always taken to a point in RemoteSpdmExecutor, line 129 'obj.RemoteSpmdController.drainIO( false );'. This line apparently lasts forever.

EDIT: When I woke up today, it started failing with an error message instead : 'Error using parallel.FevalOnAllFuture/fetchOutputs (line 69) fetchOutputs could not concatenate the OutputArguments. Set 'UniformOutput' to false. Cell contents reference from a non-cell array object.'

EDIT: Re-created my default local parallel pool a couple times. Now it's back to hanging on that same line of code.

Based on all my tests, it seems that my issue occurs whenever I construct a tall datastore from more than one tall-array folder, and then construct a tall array off of that datastore.

Tearing my hair out over this one. If anyone even has a suspicion where to look for the source of this problem, I'd appreciate it. I'll try to respond quickly to requests for more info.

0

There are 0 best solutions below