MCXlab error

163 views
Skip to first unread message

Zhengchen Cai

unread,
Jun 16, 2016, 11:00:34 PM6/16/16
to mcx-users
Hi Dr.Fang,

I was trying to run the newest MCXlab v2016.4 on matlab 15a. Matlab got killed as following :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:

A technical support engineer might contact you with further information.

Thank you for your help.** This crash report has been saved to disk as /home/ad/zcai/matlab_crash_dump.28169-1 **



MATLAB is exiting because of fatal error
Killed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I also tried to compile mex, but I got the error like this:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nvcc -c -lineinfo -Xcompiler -Wall -Xcompiler -fopenmp -m64 -DUSE_XORSHIFT128P_RAND -DUSE_ATOMIC -use_fast_math -DSAVE_DETECTORS -DUSE_CACHEBOX -use_fast_math -arch=compute_20 -code=sm_20 -code=sm_30 -code=sm_35 -code=sm_50 -code=sm_52 -DMCX_TARGET_NAME='"Fermi MCX"' --compiler-options "-fPIC" -DMCX_CONTAINER -o mcx_core.o  mcx_core.cu
nvcc fatal   : Value 'sm_30' is not defined for option 'gpu-code'
make: *** [mcx_core.o] Error 255
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Do I need to install a new version of CUDA in this case ?  I have v4.1 in my computer and it works well with the old MCXlab version. Many thanks. 

Best regards,
Zhengchen
 

Qianqian Fang

unread,
Jun 16, 2016, 11:21:28 PM6/16/16
to mcx-...@googlegroups.com
On 06/16/2016 11:00 PM, Zhengchen Cai wrote:
Hi Dr.Fang,

I was trying to run the newest MCXlab v2016.4 on matlab 15a. Matlab got killed as following :

do you get this error even when running the built-in demo scripts?

if you have a specific script that triggers this crash, please attach it
to allow me to debug.

if you are unable to run mcxlab at all, I  suggest you to download
mcx binary, and see if you are able to run the binary first. This way,
you can confirm if your system is capable of running mcx.

In theory, the latest mcx release no longer needs users to install cuda
because the cuda library is statically linked.

Qianqian

--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To post to this group, send email to mcx-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mcx-users.
For more options, visit https://groups.google.com/d/optout.

Zhengchen Cai

unread,
Jun 16, 2016, 11:37:12 PM6/16/16
to mcx-users
Hi Dr.Fang,

I tried demo_mcxlab_basic.m it works, but demo_4layer_head.m gave me the same error (matlab killed).  

This is what I got from mcx -L, and I can open mcxstudio. 

=============================   GPU Infomation  ================================
Device 1 of 1: GeForce GTX 750 Ti
Compute Capability: 5.0
Global Memory: 2146762752 B
Constant Memory: 65536 B
Shared Memory: 49152 B
Registers: 65536
Clock Speed: 1.20 GHz
Number of MPs: 5
Number of Cores: 640
SMX count: 5


在 2016年6月16日星期四 UTC-4下午11:21:28,q.fang写道:

Qianqian Fang

unread,
Jun 16, 2016, 11:50:24 PM6/16/16
to mcx-...@googlegroups.com
On 06/16/2016 11:37 PM, Zhengchen Cai wrote:
Hi Dr.Fang,

I tried demo_mcxlab_basic.m it works, but demo_4layer_head.m gave me the same error (matlab killed). 

ok, if some scripts run, at least that means your hardware and library installations
are ok.

the crash might be a result of the newly added multi-GPU support. Error&exception
handling is somewhat tricky when running inside a multi-threading environment.

I suspect that the more demanding tests, such as demo_4layer_head.m, may
failed due to the hardware restrictions (such as running for over 5 seconds,
and killed by the driver, see FAQ#1 at
http://mcx.sf.net/cgi-bin/index.cgi?Doc/FAQ#I_am_getting_a_kernel_launch_timed_out_error_what_is_that )

Such failure simply causes the program to quit when running the mcx binary,
however, in mcxlab, this will trigger an exception inside matlab. This exception
needs to be catches, elegantly terminate the mcxlab execution and return
to matlab. I recently realized this exception handling such exception was
not done properly in both the mmclab and mcxlab. I only managed to fix
mmclab recently:

https://github.com/fangq/mmc/commit/edc082a3342019acc84d4bbc7c8af39fbdaffe15

an exception inside a multi-threading environment no longer crashes matlab
after this fix. However, I haven't ported this patch to mcxlab yet.

I plan to work on this in the next few days, will email the list when I make the
commit.

Qianqian

Zhengchen Cai

unread,
Jun 16, 2016, 11:59:17 PM6/16/16
to mcx-users
Thanks a lot. Does it mean that I need to wait for the new release or do I have an alternative such as modifying my code ?

在 2016年6月16日星期四 UTC-4下午11:50:24,Qianqian Fang写道:

Qianqian Fang

unread,
Jun 17, 2016, 12:18:29 AM6/17/16
to mcx-...@googlegroups.com
On 06/16/2016 11:59 PM, Zhengchen Cai wrote:
Thanks a lot. Does it mean that I need to wait for the new release or do I have an alternative such as modifying my code ?

if what I suspected is correct, the updated code will only stop matlab
from crashing, but it won't help you solve whatever reason that had
raised the exception.

again, I suspect that you are using a non-dedicated GPU on windows.
if you run demo_4layer_head.m, it will take longer than 5 seconds,
and your kernel will be killed by the driver even I fix the exception
handling. Please read the FAQ#1 link and look for the registry hack.

Qianqian

Zhengchen Cai

unread,
Jun 17, 2016, 10:45:02 AM6/17/16
to mcx-users
Thanks. I noticed that I only have one GPU on my computer, I switched to another one which has more GPUs and it works. Have a nice weekend.

Best regards,
Zhengchen

在 2016年6月17日星期五 UTC-4上午12:18:29,Qianqian Fang写道:
Reply all
Reply to author
Forward
0 new messages