GPU Accelerator Make error

Hello,
I am facing issues when compiling a simulink model using GPU ACCELERATOR. I have downloaded simulink coder/matlab coder/GPU coder.
I am getting the following make error:
Making simulation target "Realtime_Catheter_Control_sfun", ... "D:\bin\win64\mex.exe" -R2018a -c -DMATLAB_MEX_FILE -I"E:\massyl_joystick\slprj\_sfprj\realtime_catheter_control\_self\sfun\src" -I"E:\massyl_joystick" -I"D:\extern\include" -I"D:\simulink\include" -I"D:\simulink\include\sf_runtime" -I"D:\stateflow\c\mex\include" -I"D:\rtw\c\src" -I"E:\massyl_joystick\slprj\_sfprj\Realtime_Catheter_Control\_self\sfun\src" CFLAGS="$CFLAGS -Xcompiler " -O2" " half_type.cpp Unknown MEX argument '-O2 '. gmake: *** [half_type.obj] Error -1
Unable to create mex function 'Realtime_Catheter_Control_sfun.mexw64' required for simulation.
I don't know whether the problem is in my C++ compiler or the make file, or the header files, knowing that i didn't specify any header file in the GPU acceleration tab.
I'm currently using MATLAB 2021, even though it shows above ( first line of the error) -R2018a which could be a version by default that does no longer exist.
My expected program should create 3D objects that belong to my simulation model.
I would really appreciate your helps if someone got to solve these errors.
Thank you in advance,

5 comentarios

Walter Roberson
Walter Roberson el 13 de Sept. de 2021
CFLAGS="$CFLAGS -Xcompiler " -O2" "
It looks to me as if CFLAGS was not created properly. It should have resulted in
CFLAGS="$CFLAGS -Xcompiler -O2"
Massyl Attou
Massyl Attou el 14 de Sept. de 2021
Hi, Thank you for your answer. So the problem is just on how it created the flags? not the complier? If so, how am I supposed to correct it? Do i have to modify the generated codes ( "half_type.cpp" mainly?) I'm using the cuda enabled mex-function. Do I have to install a Cuda toolkit instead? Thank you
Walter Roberson
Walter Roberson el 14 de Sept. de 2021
Unfortunately I do not have experience with that particular toolchain.
Massyl Attou
Massyl Attou el 14 de Sept. de 2021
It's okay, Thank you.
Infinite_king
Infinite_king el 6 de Mayo de 2024
Can you clarify what you meant by "compiling a simulink model using GPU ACCELERATOR" ? Which options have you selected to generate GPU Code ? Refer the following example on generating CUDA code from SIMULINK model - https://www.mathworks.com/help/gpucoder/ug/code-generation-from-simulink-models-by-using-gpu-coder.html

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Preguntada:

el 13 de Sept. de 2021

Comentada:

el 6 de Mayo de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by