MATLAB Answers

Why do the locks generated by the MCR take a long time to expire while running many instances of an executable generated using the MATLAB Compiler?

16 views (last 30 days)
I am running many instances of my MATLAB Compiler generated executable, and these processes are launched on different machines. All of them use the same MCR, installed on a shared network resourcel.
When I run about 30 instances, all the processes get the requisite read and write locks from the filesystem on the MCR cache directory, and release them at the end of their lifetime.
However, when I have more than 40 instances of this application running at the same time on different machines, the processes get the locks they require, and generate the desired output. The release of these locks, however, takes a very long time, and, as a result, all these processes are waiting to terminate.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
This behavior is typically observed when all the executables try to access the same MCR cache directory.
As a possible workaround, please set the MCR_CACHE_ROOT variable to a local mount location on each machine that will instantiate the MATLAB Compiler generated application. An example is shown below:
export MCR_CACHE_ROOT=/tmp/mcr_cache_root_$USER # local to host
mkdir -p @MCR_CACHE_ROOT

  0 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2008a

Community Treasure Hunt

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

Start Hunting!