MATLAB无法启动并行(parpool)Failed to locate and destroy old interactive jobs.

起因

最近在集群中使用MATLAB时发现无法启动并行池,在MATLAB代码中使用parfor进行并行处理,但是用时比之前长了很多,查看输出文件时发现只输出了

Starting parallel pool (parpool) using the ‘local’ profile …

并没有

Connected to the parallel pool (number of workers: 12)

所以就是没有成功启动并行池。

尝试

在集群服务器上用xmanager打开了MATLAB的图形化界面,点左下角并行池那里,打开Parallel Preference,进入 Cluster Profile Manager,然后validate一下cluster profile,发现最后一项失败,提示

Failed to locate and destroy old interactive jobs.

在MATLAB命令行直接输入parpool启动并行池则报错如下

Parallel pool failed to start with the following error. For more detailed
information, validate the profile 'local' in the Cluster Profile Manager.

Caused by:
    Error using parallel.internal.pool.InteractiveClient>iThrowWithCause (line
    668)
    Failed to locate and destroy old interactive jobs.
        Error using parallel.Cluster/findJob (line 74)
        Unknown type: concurrentconcurrent.

解决方法

这里直接贴出链接: link.
我是尝试了第五个方法解决的,也就是修改了 local_cluster_jobs 这个文件夹。
可以在MATLAB命令行输入prefdir查看你的文件夹位置,我的是在家目录下的.matlab里,改完文件夹名称然后重启MATLAB就解决了

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐