【发布时间】:2015-04-09 18:26:34
【问题描述】:
所以我正在尝试使用 Matlab 编译器来构建一个独立的应用程序,该应用程序可以使用 MCR 在单独的机器上运行。实际应用程序遵循此guide 对 GPU 进行基准测试。当我按照this 打开 matlab 时,我执行以下命令:
mcc -mv -o gpuTest mainBench.m benchFcn.m executeBenchmarks.m getData.m paralleldemo_gpu_backslash.m timeSolve.m waitForCpu.m waitForGpu.m
输出是:
Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Parsing file "/media/hdd/work/matlab/gpuBench/mainBench.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/benchFcn.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/executeBenchmarks.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/getData.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/paralleldemo_gpu_backslash.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/timeSolve.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/waitForCpu.m"
(Referenced from: "Compiler Command Line").
Parsing file "/media/hdd/work/matlab/gpuBench/waitForGpu.m"
(Referenced from: "Compiler Command Line").
Parsing file "/opt/MATLAB/R2014a/toolbox/compiler/deploy/deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "/opt/MATLAB/R2014a/toolbox/compiler/deploy/printdlg.m"
(Referenced from: "Compiler Command Line").
比在其他机器上,鉴于设置了环境变量,我只是执行命令
./gpuTest
产生的错误是:
Cannot CD to /media/hdd/work/matlab (Name is nonexistent or not a directory).
Error in startup (line 1)
问题是没有应该编译的“启动”脚本。但是我确实有一个“startup.m”脚本,它在我的启动文件夹中,它实际上完全执行“cd /media/hdd/work/matlab”和其他一些东西。
我有两个问题:
- 为什么它还要编译我的启动脚本?
- 如何解决此问题以仅执行主脚本?
【问题讨论】:
标签: matlab matlab-deployment matlab-compiler