问题
早期版本的 Imatest 出现了一个问题,一些原本运行正常的常用模块和工具现在会卡死。如果您的机器也出现了这种情况,请尝试以下解决方案。
解决方案
要解决此问题,需要更新 libcudart.dylib 版本的代码签名。虽然听起来很复杂,但只需一条终端命令即可完成。要运行此命令,您需要知道 MATLAB Runtime 自带的 libcudart.dylib 的文件路径。受影响的最新 Imatest 版本的 libcudart.dylib 文件路径如下表所示:
Imatest 版本 | 库路径 |
|---|---|
2021.1 | /Applications/MATLAB/MATLAB_Runtime/v99/bin/maci64/libcudart.10.2.dylib |
2020.2 | /Applications/MATLAB/MATLAB_Runtime/v98/bin/maci64/libcudart.10.1.dylib |
2020.1 | /Applications/MATLAB/MATLAB_Runtime/v97/bin/maci64/libcudart.10.1.dylib |
如果您的 Imatest 版本未在上表中列出,并且您遇到了该问题,请找到与您的 Imatest 版本一起附带的 MATLAB Runtime 版本中libcudart.<major number>.<minor number>.dylib文件的路径。
知道文件路径后,请在安装了 Imatest 的 Mac 上执行以下步骤:
Open a terminal window
Enter the following and then press `return`
sudo codesign --deep -fs - <library path>where
<library path>should be replaced with the library path from the table above. Please note the spaces surrounding the trailing-.
For example, for Imatest 2021.1, you would runsudo codesign --deep -fs - /Applications/MATLAB/MATLAB_Runtime/v99/bin/maci64/libcudart.10.2.dylib[Optional] Verify that the library was successfully code-signed by running the following
codesign --verbose --verify <library path>
If the code-signing operation was successful, you should see output similar tocodesign --verify --verbose /Applications/MATLAB/MATLAB_Runtime/v99/bin/maci64/libcudart.10.2.dylib /Applications/MATLAB/MATLAB_Runtime/v99/bin/maci64/libcudart.10.2.dylib: valid on disk /Applications/MATLAB/MATLAB_Runtime/v99/bin/maci64/libcudart.10.2.dylib: satisfies its Designated Requirement
Start Imatest as normal and attempt the operation that previously froze.
如果 libcudart.10.2.dylib 不存在 (2020.2)
有两种方法可以解决这个问题:
如果您已安装 Matlab v97 运行时环境,则其中应该包含 v98 所需的相同文件副本。将此文件从 v97 运行时环境目录中的相应文件夹复制粘贴到 v98 运行时环境目录中的相同位置。
上面给出的 Imatest v2020.1 的文件路径应该是 v97 运行时文件的路径。
如果您没有安装 Matlab v97 运行时环境,我们建议您重新安装 Matlab v98 运行时环境。全新安装后应该会包含缺失的文件。
**如果您按照这些说明操作后仍然遇到困难,请联系support@imatest.com 。