필터 지우기
필터 지우기

Error in loadlibrary.m MATLAB R2011a

조회 수: 1 (최근 30일)
Goryn
Goryn 2011년 5월 10일
When I use loadlibrary.m function in parallel computations, for example using parameterSweep.m function from Algorithmic Trading 2010 Webinar, it tells me:
??? Error using ==> parallel_function at 598
Error in ==> loadlibrary at 264
A 'Selected' compiler was not found. You may need to run mex -setup.
But I've ran mex -setup, and have chosen Lcc and also've tried Visual C++ 2005, 2008, Open WATCOM C++, other compilers, but an error is the same...
Without using function 'matlabpool open ...' it works well, in R2010b it also works well in all cases. What's wrong with R2011a? How to fix it? Do you have any sugestions, please?
  댓글 수: 3
Goryn
Goryn 2011년 5월 10일
Yes, I do local matlabpool configuration in both.
Goryn
Goryn 2011년 5월 10일
In R2010b it hasn't an error about compiler, but Ken's tip does work well. There is a problem with a license for the DLL that I've described in an answer for Ken's reply.

댓글을 달려면 로그인하십시오.

채택된 답변

Ken Atwell
Ken Atwell 2011년 5월 10일
It sounds like the cluster is attempting to invoke a compiler to support loadlibrary, but no compiler has been set up on the cluster. This probably isn’t the best way to go about this anyhow. I would try the following:
  1. Invoke loadlibrary on your local machine (not the cluster) with the mfilename option.
  2. Inside your parfor loop, load your DLL using the MATLAB file created in step #1 (that is, don’t call loadlibrary directly).
This will avoid the need for a compiler on the cluster and should be sufficient for your needs. You’ll need to ensure that the DLL you are loading, as well at the generated MATLAB file (and thunk file on win64 – see the doc for loadlibrary) are visible to your cluster. You may get this “for free” if you have a shared filesystem between the cluster and client; otherwise, you may need to marshal those files to the cluster using PCT’s configuration manager.
All of this assumes the cluster is running the same platform (win32?) as your client machine. If the cluster is something else, this approach won’t work.
  댓글 수: 2
Goryn
Goryn 2011년 5월 10일
Thank you, Ken! It does work. But there is another problem: the DLL was installed with license for one computer (but I can get more) and when it calls from another CPU core (not cluster in this case) it brings an error like "you have'nt got a permission for use this DLL on another comp". Any sugestions how to avoid that, please?
Ken Atwell
Ken Atwell 2011년 5월 11일
Sorry, Goryn, no ideas on the license management issue. The vendor for your DLL may be able to help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by