I'm trying to deploy a compiled simulation to a cluster. I'm running into an issue where I set the environment variable MCR_CACHE_ROOT, where the batched jobs unpack the MCR, but I can't figure out a way to have a unique path for each node. As I understand it, this environment variable is shared amongst all nodes. If I change it on one, the others see that change too(?).
Maybe I can initially define MCR_CACHE_ROOT in my pbs script, and then change it with get/setenv within the compiled Matlab code, or is that too late in the execution stream?
I'm finding it very hard to find details on how the MCR_CACHE_ROOT variable is actually used. How is the MCR_CACHE_ROOT used (if at all) when programs are compiled with the -C flag? Any insights/suggestions are welcome!
FYI: I'm using bcMPI to batch out the jobs.
Thank you, Michael