【问题标题】:Error using Matlab parpool from Java on Linux在 Linux 上使用 Java 中的 Matlab parpool 时出错
【发布时间】:2018-07-06 21:51:21
【问题描述】:

我需要在我自己的 Java 应用程序中使用编译为 JAR 文件的 MATLAB 库。该库使用 parpool 并有一些 parfor 运算符。我们可以使用this example 作为测试。

在 Windows 上它可以工作。在 Linux (Ubuntu xenial) 上,我收到类似 this 的错误,但不一样:

Starting parallel pool (parpool) using the 'local_mcruserdata' profile ...

Error using parpool (line 104)
Failed to start a parallel pool. (For information in addition to the causing error, validate the profile 'local_mcruserdata' in the Cluster Profile Manager.)

Error in sample_pct (line 11)


Caused by:
    Error using parallel.internal.pool.InteractiveClient>iThrowWithCause (line 666)
    Failed to initialize the interactive session.
        Error using parallel.internal.pool.InteractiveClient>iThrowIfBadParallelJobStatus (line 767)
        The interactive communicating job failed with no message.

The error is com.mathworks.toolbox.javabuilder.MWException: Failed to start a parallel pool. (For information in addition to the causing error, validate the profile 'local_mcruserdata' in the Cluster Profile Manager.)

我的 MATLAB 是 9.2.0.538062 (R2017a),我的 JDK 在两个系统上都是 1.8.0_171 x86_64。

如果我注释第 11 行(parpool 函数调用),错误就会消失,但 parfor 运算符不会创建额外的工人。

这是一个已知的错误,可以修复吗?

【问题讨论】:

  • 嗯,您可能需要联系 MathWorks 支持来帮助解决此问题。您可以尝试将setSchedulerMessageHandler(@disp); setenv('MDCE_DEBUG','true') 添加到您的示例中,看看它是否发现了更多有用的信息。
  • @Edric,感谢您的建议!这显示了消息:matlabroot/bin/glnxa64/ctfxlauncher: error while loading shared libraries: libmwmclmcrrt.so.9.2: cannot open shared object file: No such file or directory

标签: java linux matlab


【解决方案1】:

在示例中添加setSchedulerMessageHandler(@disp); setenv('MDCE_DEBUG','true') 后(正如评论中所建议的那样)我得到了消息:

matlabroot/bin/glnxa64/ctfxlauncher: error while loading shared libraries: libmwmclmcrrt.so.9.2: cannot open shared object file: No such file or directory

find matlabroot -name libmwmclmcrrt.so.9.2matlabroot/runtime/glnxa64/libmwmclmcrrt.so.9.2

matlabroot/runtime/glnxa64 目录添加到LD_LIBRARY_PATH 有帮助!

【讨论】:

  • 最好使用ld.so.confldconfig 而不是LD_LIBRARY_PATH,但这个变体仍然不起作用(不符合错误Please install the correct version of the MATLAB Runtime
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-08-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-22
  • 2012-12-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多