matlab crashed when calling MEX
显示 更早的评论
I successfully converted my MATLAB source code to CUDA C code using GPU coder and generated a MEX file, but when I call the MEX file, matlab crashes and quits. The matlab_crash_dump in the TMEP folder shows the following. Can anyone tell me what went wrong or how to find this error?
--------------------------------------------------------------------------------
Access violation detected at 2025-04-05 16:19:22 +0800
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 2 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 3 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 4 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 5 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 6 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 7 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Graphics card 8 : (标准显示卡类型) ( 0x19e5 ) Microsoft 基本显示适配器 Version 10.0.22621.1 (2006-6-21)
Graphics card 9 : NVIDIA ( 0x10de ) NVIDIA Tesla V100-SXM2-32GB Version 31.0.15.3625 (2023-6-10)
Interpreter 0 : Executing request: 4D61746C6162526571756573742E637070
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 9811929
MATLAB Root : D:\Program Files\Matlab
MATLAB Version : 24.2.0.2863752 (R2024b) Update 5
OpenGL : hardware
Operating System : Microsoft Windows 11 专业版
Process ID : 15416
Processor ID : x86 Family 6 Model 85 Stepping 4, GenuineIntel
Session Key : 140956f8-750d-47f4-81ea-83acb9360395
Window System : Version 10.0 (Build 22631)
6 个评论
Manikanta Aditya
2025-4-7
Can you share the entire crash log? @Shi
Shi
2025-4-7
Manikanta Aditya
2025-4-7
When MATLAB crashes, you will be prompted with an dialog box asking if you want to crash log, From there you can get the entire crash log.
Shi
2025-4-7
Manikanta Aditya
2025-4-7
@Shi, I can tell you to check the temporary files directory. On Windows, crash logs are typically stored in the temporary files directory. You can access this directory by entering %temp% in the Windows search bar or by navigating to C:\Users\<YourUsername>\AppData\Local\Temp
Refer this MATLAB Answer post: How do I locate the crash dump files generated by MATLAB? - MATLAB Answers - MATLAB Central.
You can also use the following MATLAB command to open the temp directory:
cd(tempdir)
- MATLAB generates crash dump files with names like matlab_crash_dump.XXXX, java.log.XXXX, and hs_error_pidXXXX.log1. These files contain valuable information for debugging.
Justin Hontz
2025-4-7
@Shi Unfortunately, the crash log does not provide much information about what exactly went wrong. With that said, the following are some initial debugging steps that you can try:
- See if you can reproduce the crash using MATLAB Coder without using GPU Coder.
- Try simplifying / minimizing the entry point you are generating code for until the issue is no longer reproducible to help narrow down the source of the issue.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with GPU Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!