It looks like inmem does not list functions loaded inside parfor loops. At least that is what I'm experiencing in R2014b and I have not found this mentioned in the docs. Is this expected behaviour?
I understand it's the workers who execute the file, but the master process could be made aware of which files are loaded by the workers ... it already communicates with all workers back and forth, and waits for all workers to finish anyway.
This would be extremely useful for reproducibility in research. I could save/zip all files that were loaded for the execution chain and also save the inputs as .mat and the last history entry, and then be able to completely reproduce the same results later. As it is, not all files are saved and that's a shame.
I know I could use matlab.codetools.requiredFilesAndProducts but that saves all dependencies (not just those needed for the particular set of inputs I used), which in my case are more than 100 MB worth of files, as opposed to 100 KB with inmem.
[files,mexs] = inmem('-completenames');
The above does not list 'external_file.m'. Replacing parfor with for will list it, but then my code is slow ...