필터 지우기
필터 지우기

How to set LD_LIBRARY_PATH for local workers

조회 수: 3 (최근 30일)
Robin
Robin 2014년 7월 10일
답변: Robin 2014년 7월 10일
I have the Distributed Computing Toolbox which I am using with the builtin 'local' 12 worker profile.
How can I set LD_LIBRARY_PATH for those workers?

채택된 답변

Robin
Robin 2014년 7월 10일
I think I found a solution.
I copied .matlab7rc.sh from MATLABROOT to my home directory, and edited to add the directory I need in LD_LIBRARY_PATH to the LDPATH_SUFFIX variable.
The copy in the home dir seems to override the one in MATLABROOT and this seems to effect the workers as well as a normal Matlab session.

추가 답변 (1개)

Sanket Mishra
Sanket Mishra 2014년 7월 10일
Use below sequence of commands to set LD_LIBRARY_PATH for 12 workers:
parpool(12);
pctRunOnAll setenv('LD_LIBRARY_PATH',getenv('PATH'));
getenv('LD_LIBRARY_PATH');
delete(gcp);
You require parallel computing toolbox to be installed on your machine. I tested this on MATLAB R2014a to be working as expected.
  댓글 수: 1
Robin
Robin 2014년 7월 10일
편집: Robin 2014년 7월 10일
I don't think this will work. To have an effect LD_LIBRARY_PATH must be set in the shell environment calling the executable. I don't think setting it post hoc from within the running worker will have any effect.

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

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by