Matlab compiler large CTF file error

조회 수: 12 (최근 30일)
Laurent
Laurent 2024년 12월 5일
답변: Laurent 2024년 12월 6일
Hi everyone,
I'm trying to compile a relatively small function "dataset_processing.m" using Matlab Compiler R2022b on a Linux machine, for later deployment as a standalone executable on another Linux machine. I compile in the Linux terminal with the following command:
mcc -m dataset_processing.m -a functions/ -d test_compiler/ -R -nodisplay
I obtain the following error:
Out of disk space. Failed to create CTF file. Please free 11515542204 bytes and re-run Compiler.
The requested CTF file size is huge (10.7 GB), so I suspect a problem. Indeed, I tested other compilations to compare: when testing a compilation on Windows with R2023b it works fine and the executable is 1.5 MB, and when testing on Linux with R2018b it works fine and the executable is 3 MB. Sadly, I cannot use Windows, nor Linux with R2018b because my code uses functions from recent releases. I also cannot free the required disk space because the Linux machine for compilation is a small dedicated server with limited disk space.
I also tried to compile with R2020b, R2021a, and R2021b, but I had the same issue. I tried to put the -C flag as compiler option to prevent creating a CTF file (from what I understood from the documentation) but the same error appeared.
Would someone have a solution to avoid creating the CTF file, or to prevent it from being that large?
Thank you in advance!
Laurent

채택된 답변

Laurent
Laurent 2024년 12월 6일
Update:
I managed to solve the problem: the flag -d to specify the destination folder was causing the problem. When doing
mcc -m dataset_processing.m -a functions/ -d test_compiler/ -R -nodisplay
I have the huge CTF file problem, but when doing
mcc -m dataset_processing.m -a functions/ -R -nodisplay
it works fine. This is very strange, but it works now.

추가 답변 (1개)

Subhajyoti
Subhajyoti 2024년 12월 5일
It is my understanding that you are creating a standalone application for deployment outside MATLAB.
You can creates a deployable standalone application with additional options using the 'compiler.build.standaloneApplication'. It has been introduced since MATLAB R202b.
Refer to the following MathWorks Documentation to know more about it:
  댓글 수: 1
Laurent
Laurent 2024년 12월 6일
Thank you for your answer. I tried using the 'compiler.build.standaloneApplication' with various options such as 'EmbedArchive','Off' and 'SupportPackages","none" to make a test without embedding the CTF file and without including any package/toolbox, however I still get the same error as when trying to compile with the usual mcc command...
Would you know what could be causing that CTF file to be so large (even with no included toolbox), or what else could be tried to reduce its size? Thank you in advance.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by