Segmentation violation Linux

52 views
Skip to first unread message

Javier

unread,
Jun 23, 2017, 2:44:12 PM6/23/17
to mcx-users
Hi Dr Fang and everybody,

I'm having a problem running mcxlab in linux. The problem is a Segmentation violation, this only happend when I try to run a simulation with photons over 1e+6 , if I use, 1e+5 photons or less mcx runs with out problem.   In the attached example, the simulation uses 1e+9.

Could you please help me with any idea about what is happening??


Launching MCXLAB - Monte Carlo eXtreme for MATLAB & GNU Octave ...
Running simulations for configuration #1 ...
mcx.nphoton=1e+09;
mcx.dim=[351 422 230];
mcx.srcdir=[0 -1 0];
mcx.gpuid='11';
mcx.autopilot=1;
mcx.tstart=0;
mcx.tend=5e-09;
mcx.tstep=1e-09;
mcx.isreflect=1;
mcx.unitinmm=0.5;
mcx.srcpos=[211 399 105];
mcx.detnum=3;
mcx.medianum=10;
mcx.seed=-1;
###############################################################################
#                      Monte Carlo eXtreme (MCX) -- CUDA                      #
#          Copyright (c) 2009-2016 Qianqian Fang <q.fang at neu.edu>          #
#                             http://mcx.space/                               #
#                                                                             #
#         Computational Imaging Laboratory (CIL) [http://fanglab.org]         #
#            Department of Bioengineering, Northeastern University            #
###############################################################################
#    The MCX Project is funded by the NIH/NIGMS under grant R01-GM114365      #
###############################################################################
$Rev::b744b3 $ Last $Date::2016-04-26 08:41:08 -04$ by $Author::Qianqian Fang $
###############################################################################
- variant name: [Fermi] compiled for GPU Capability [100] with CUDA [7000]
- compiled with: RNG [xorshift128+] with Seed Length [4]
- this version CAN save photons at the detectors


GPU=1 (Tesla M2090) threadph=20345 extra=1280 np=500000000 nthread=24576 maxgate=5 repetition=1

GPU=2 (Tesla M2090) threadph=20345 extra=1280 np=500000000 nthread=24576 maxgate=5 repetition=1
initializing streams ...        initializing streams ...        init complete : 18 ms
requesting 16128 bytes of shared memory
lauching MCX simulation for time window [0.00e+00ns 5.00e+00ns] ...
init complete : 15 ms
requesting 16128 bytes of shared memory
lauching MCX simulation for time window [0.00e+00ns 5.00e+00ns] ...
simulation run# 1 ...   simulation run# 1 ...   kernel complete:        1584080 ms
retrieving fields ...   detected 234017 photons, total: 234017  transfer complete:      1584453 ms
data normalization complete : 1584454 ms
kernel complete:        2520156 ms
retrieving fields ...   detected 234504 photons, total: 468521  transfer complete:      2520531 ms
data normalization complete : 2520532 ms
normalizing raw data ...        normalization factor alpha=4.000000
simulated 1000000000 photons (1000000000) with 24576 threads (repeat x1)
MCX simulation speed: 396.80 photon/ms
total simulated energy: 1000000000.00   absorbed: 35.19157%
(loss due to initial specular reflection is excluded in the total)
Attempt to restart MATLAB? [y or n]>>n
------------------------------------------------------------------------
       Segmentation violation detected at Fri Jun 23 11:18:46 2017
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled
  Crash Mode          : continue (default)
  Current Graphics Driver: Unknown software
  Current Visual      : None
  Default Encoding    : UTF-8
  GNU C Library       : 2.17 stable
  Host Name           : localhost.localdomain
  MATLAB Architecture : glnxa64
  MATLAB Root         : /usr/local/MATLAB/R2015aSP1
  MATLAB Version      : 8.5.1.281278 (R2015a) Service Pack 1
  OpenGL              : software
  Operating System    : Linux 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64
  Processor ID        : x86 Family 6 Model 45 Stepping 7, GenuineIntel
  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System       : No active display

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 00007f439ed5e400  RBX = 00000000008efb34
  RCX = 0000000000000000  RDX = 00000000001c8a94
  RSP = 00007f4402ac1d48  RBP = 00007f4402ac2f70
  RSI = 00007f42bd395fb0  RDI = 00007f439f4853a0

   R8 = 00007f439ed5e400   R9 = 0000000000500000
  R10 = 00007f4402ac1ad0  R11 = 00007f441fbbae30
  R12 = 00007f4402ac3560  R13 = 000000000000000e
  R14 = 0000000000000000  R15 = 00007f4402ac1f80

  RIP = 00007f441db2b08e  EFL = 0000000000010202

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f441db2b08e                                   /lib64/libc.so.6+01351822
[  1] 0x00007f4308107e54 /home/javierhv/ForwardModel2/MCX/mcxlab/mcxlab.mexa64+00118356 mexFunction+00002358
[  2] 0x00007f44136048fa  /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmex.so+00149754 mexRunMexFile+00000090
[  3] 0x00007f4413601674  /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmex.so+00136820
[  4] 0x00007f4413602284  /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmex.so+00139908
[  5] 0x00007f441293b79a /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00812954 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000762
[  6] 0x00007f441293bc60 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00814176 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032
[  7] 0x00007f4411bac220 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04190752
[  8] 0x00007f4411b5bee2 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03862242
[  9] 0x00007f4411b5dc62 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03869794
[ 10] 0x00007f4411b63b47 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03894087
[ 11] 0x00007f4411b5f33f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03875647
[ 12] 0x00007f4411b5ff74 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03878772
[ 13] 0x00007f4411bd58fe /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04360446
[ 14] 0x00007f441293b79a /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00812954 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000762
[ 15] 0x00007f441293bc60 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00814176 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032
[ 16] 0x00007f44006231cd /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+02474445
[ 17] 0x00007f44005b8602 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+02037250
[ 18] 0x00007f44005b994f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+02042191
[ 19] 0x00007f44005bf250 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+02064976
[ 20] 0x00007f44005bb093 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+02048147
[ 21] 0x00007f44006af250 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+03048016
[ 22] 0x00007f44128e4574 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00456052 _ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2_+00000244
[ 23] 0x00007f44006ac7b1 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcos_impl.so+03037105
[ 24] 0x00007f4411babe8f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04189839
[ 25] 0x00007f4411bc1224 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04276772
[ 26] 0x00007f4411bc208f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04280463
[ 27] 0x00007f4411bc3370 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04285296
[ 28] 0x00007f4411b3e4f6 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03740918
[ 29] 0x00007f4411b2e665 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03675749
[ 30] 0x00007f4411b5cd12 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03865874
[ 31] 0x00007f4411b63b47 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03894087
[ 32] 0x00007f4411b5f33f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03875647
[ 33] 0x00007f4411b5ff74 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03878772
[ 34] 0x00007f4411bd58fe /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04360446
[ 35] 0x00007f441293b79a /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00812954 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000762
[ 36] 0x00007f441293bc60 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00814176 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032
[ 37] 0x00007f4411d85824 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+06129700
[ 38] 0x00007f4411d87139 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+06136121
[ 39] 0x00007f4411d8796c /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+06138220
[ 40] 0x00007f4411bfc633 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04519475
[ 41] 0x00007f4411c09cfe /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04574462
[ 42] 0x00007f4411c09de3 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04574691
[ 43] 0x00007f4411d40d34 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+05848372
[ 44] 0x00007f4411b5feaa /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03878570
[ 45] 0x00007f4411bd58fe /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04360446
[ 46] 0x00007f441293b8e9 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00813289 _ZN8Mfh_file16dispatch_fh_implEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00001097
[ 47] 0x00007f441293bc60 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_dispatcher.so+00814176 _ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2_+00000032
[ 48] 0x00007f4411b949f5 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+04094453
[ 49] 0x00007f4411b555b9 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03835321
[ 50] 0x00007f4411b519f7 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03820023
[ 51] 0x00007f4411b51cf3 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwm_interpreter.so+03820787
[ 52] 0x00007f4413846f3c /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwbridge.so+00229180
[ 53] 0x00007f4413847b21 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwbridge.so+00232225 _Z8mnParserv+00000737
[ 54] 0x00007f441ef422bf /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00799423 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000031
[ 55] 0x00007f441ef220a3 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00667811
[ 56] 0x00007f441ef23fa9 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00675753 _ZN5boost6detail11task_objectIvNS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEE6do_runEv+00000025
[ 57] 0x00007f441ef24ac7 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00678599 _ZN5boost6detail9task_baseIvE3runEv+00000071
[ 58] 0x00007f441ef24b27 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00678695
[ 59] 0x00007f441ef1fe6a /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00659050
[ 60] 0x00007f441f63941b /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwservices.so+01737755
[ 61] 0x00007f4410ecdf1d /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwuix.so+00233245
[ 62] 0x00007f441f71179a /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwservices.so+02623386
[ 63] 0x00007f441f711ad4 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwservices.so+02624212
[ 64] 0x00007f441f71327f /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwservices.so+02630271
[ 65] 0x00007f441f713cbc /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwservices.so+02632892 _Z25svWS_ProcessPendingEventsiib+00000092
[ 66] 0x00007f441ef204e8 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00660712
[ 67] 0x00007f441ef20804 /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00661508
[ 68] 0x00007f441ef0cced /usr/local/MATLAB/R2015aSP1/bin/glnxa64/libmwmcr.so+00580845
[ 69] 0x00007f441ddaadc5                             /lib64/libpthread.so.0+00032197
[ 70] 0x00007f441dad7ced                                   /lib64/libc.so.6+01010925 clone+00000109
[ 71] 0x0000000000000000                                   <unknown-module>+00000000


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:
    http://www.mathworks.com/support/contact_us/

A technical support engineer might contact you with further information.

Qianqian Fang

unread,
Jun 23, 2017, 3:13:44 PM6/23/17
to mcx-...@googlegroups.com, Javier
On 06/23/2017 02:44 PM, Javier wrote:
Hi Dr Fang and everybody,

I'm having a problem running mcxlab in linux. The problem is a Segmentation violation, this only happend when I try to run a simulation with photons over 1e+6 , if I use, 1e+5 photons or less mcx runs with out problem.   In the attached example, the simulation uses 1e+9.

Could you please help me with any idea about what is happening??

hi Javier

can you try the latest nightly-build binaries?

http://mcx.space/nightly/

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.


Reply all
Reply to author
Forward
0 new messages