フィルターのクリア

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 Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by