I did some further testing and did narrow down the problem scope, but I'm even more perplexed...
I wrote a very simple script:
function compiledScript(filename, in2)
%%Handle deployed setup:
global MPI_COMM_WORLD;
if isdeployed
in2 = str2num(in2);
% Setup MPICH:
MPI_Init();
myID = MPI_Comm_rank(MPI_COMM_WORLD) + 1
end
%%Initial test script (verified working)
whos
load(['../../' filename])
whos
% Test loaded function handle from above load: (verified working)
callMe(in2, 3)
%%Try simply loading the same matlab file for the big sims:
filename = '/workspace/workgroup/data/MedJTOpath_initialTest.mat'
load(filename)
whos
% Close MPICH:
if isdeployed
MPI_Finalize();
mex_exit();
end
return
Using this, I tested the following cases: -Compile this, not including any of the path dependencies of the latter loaded variables. While I got all sorts of warnings that Matlab didn't know how to interpret the loaded objects when the load executed, all the variables were quickly loaded to the workspace and just converted to structs. Good!
- I commented the latter load code, and added the path dependencies for the second loaded file (which wasn't loaded in this case). No issues... the first statements executed in ~2:30 rather than 0:36 when the extra path dependencies weren't included on the mcc call. Good.
So, from the two cases above, I seem to be able to compile scripts with the necessary path dependencies, and I seem to be able to efficiently load in the .mat file.
BUT, when I load the very same path dependencies and execute the latter load command, the same freeze occurs and the script times out with no errors. I gave it 59:00 to see if it was just taking a little longer, but still nothing...
Ideas? If I add path dependencies and I don't get errors in the mcc output, shouldn't I be good with that code?
I'm open to testing other things if you think that would shed more light on anything. -Mike