gpt4 book ai didi

MATLAB 编译器处理来自不相关工具箱的 mcc.enc

转载 作者:太空宇宙 更新时间:2023-11-03 20:26:25 25 4
gpt4 key购买 nike

我正在使用 mcc 编译我的 MATLAB 项目。我使用的机器上安装了很多 MATLAB 工具箱,但我的代码只需要几个(例如 distcomp 和图像)。但是,每当我运行 mcc 时,它最终都会“处理”许多工具箱的 mcc.enc 文件,包括那些我的代码不需要的工具箱。

这是 mcc 输出的开头(我使用 -R '-nodisplay' 运行它以与我正在使用的集群兼容)。

Warning: No display specified.  You will not be able to display graphics on the screen.
Compiler version: 4.15 (R2011a)
Processing /cm/shared/apps/matlab/7.12.0/toolbox/matlab/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/distcomp/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/images/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/stats/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/imageslib/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/system/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/spcuilib/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/control/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/controllib/engine/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/shared/controllib/general/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/signal/mcc.enc
Processing /cm/shared/apps/matlab/7.12.0/toolbox/nnet/mcc.enc

我注意到它在我的桌面上运行 mcc 时也会做同样的事情。其中一些 mcc.enc 文件(尤其是 .../signal/mcc.enc 和 .../nnet/mcc.enc)比执行其余的 mcc 文件需要更多的时间来处理。有什么方法可以排除处理不需要的 mcc.enc 文件吗?

最佳答案

使用 MATLAB IDE 中的“部署工具”,进入项目设置并从“路径上的工具箱”选项卡中取消选择所有不需要的工具箱。

screenshot

还有一个mcc参数-N从路径中清除所有文件夹,只保留核心 MATLAB 文件夹。

-N Clear Path

Passing -N effectively clears the path of all folders except the following core folders (this list is subject to change over time):

  • matlabroot/toolbox/matlab
  • matlabroot/toolbox/local
  • matlabroot/toolbox/compiler/deploy

It also retains all subfolders of the above list that appear on the MATLAB path at compile time. Including -N on the command line allows you to replace folders from the original path, while retaining the relative ordering of the included folders. All subfolders of the included folders that appear on the original path are also included. In addition, the -N option retains all folders that the user has included on the path that are not under matlabroot/toolbox.

关于MATLAB 编译器处理来自不相关工具箱的 mcc.enc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11567019/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com