hi Tamara,
can you confirm you are using the latest mcx/mcxlab release (v2025.10)?
was the svmc volume generated by mcxsvmc.m?
if you can briefly describe the domain settings (size, medium types, and object shapes), I may be able to understand what might go wrong to trigger this error. but to be able to fix it, I would like a small reproducer - if you cut down the volume and this bug disappeared, you may have to share the full volume, or the script that I can regenerate. in this case, please use a shared drive/url to share, you can email me directly.
Qianqian
Tamara --
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 view this discussion visit https://groups.google.com/d/msgid/mcx-users/5cce3e14-3bb0-4d9f-b0e6-ea8938ff67ecn%40googlegroups.com.
hi Tamara,
I received your exported cfg, and ran it on 3 of my GPUs (2080Super, Titan, 5090, Titan V) on two different machines, all of them completed without showing this error.
can you try on a different PC? or a Linux machine?
a=loadjson('Error_should_never_happen_mcfg.json');
a.vol=uint8(a.vol);
flux=mcxlab(a);
Launching MCXLAB - Monte Carlo eXtreme for MATLAB & GNU
Octave ...
Running simulations for configuration #1 ...
mcx.dim=[100 25 200];
mcx.mediabyte=97;
WARNING: redundant field 'dim'
mcx.medianum=3;
mcx.issrcfrom0=1;
mcx.unitinmm=0.002;
WARNING: redundant field 'mediabyte'
mcx.tstart=0;
mcx.tend=5e-09;
mcx.tstep=5e-09;
mcx.srctype='planar';
mcx.srcpos=[0 0 0 1];
mcx.srcdir=[0 0 1 0];
mcx.srcparam1=[400 0 0 0];
mcx.srcparam2=[0 400 0 0];
mcx.nphoton=1e+08;
mcx.respin=1;
mcx.isreflect=1;
mcx.bc='cc_cc_001000';
WARNING: redundant field 'isnormalize'
mcx.seed=42;
mcx.maxdetphoton=1e+08;
mcx.autopilot=1;
mcx.outputtype='energy';
mcx.savedetflag=52;
mcx.debuglevel=4;
mcx.issavedet=1;
mcx.issaveseed=1;
WARNING: redundant field 'verb'
mcx.gpuid=2;
###############################################################################
# Monte Carlo eXtreme (MCX) --
CUDA #
# Copyright (c) 2009-2025 Qianqian Fang <q.fang at
neu.edu> #
# https://mcx.space/ &
https://neurojson.io #
#
#
# Computational Optics & Translational Imaging (COTI) Lab-
http://fanglab.org #
# Department of Bioengineering, Northeastern University,
Boston, MA, USA #
###############################################################################
# The MCX Project is funded by the NIH/NIGMS under grant
R01-GM114365 #
###############################################################################
# Open-source codes and reusable scientific data are essential
for research, #
# MCX proudly developed human-readable JSON-based data formats
for easy reuse.#
#
#
#Please visit our free scientific data sharing portal at
https://neurojson.io #
# and consider sharing your public datasets in standardized
JSON/JData format #
###############################################################################
$Rev::76f8b4$v2025.9 $Date::2025-09-28 17:14:21 -04$ by
$Author::Qianqian Fang$
###############################################################################
- code name: [Kilo-Kelvin] compiled by nvcc [11.3] for CUDA-arch
[350] on [Sep 30 2025]
- compiled with: RNG [xorshift128+] seed length [4]
GPU=2 (NVIDIA GeForce RTX 2080 SUPER) threadph=1017 extra=24832
np=100000000 nthread=98304 maxgate=1 repetition=1
initializing streams ... init complete : 1 ms
requesting shared memory: 1280 bytes
launching MCX simulation for time window [0.00e+00ns 5.00e+00ns]
...
simulation run# 1 ...
kernel complete: 63690 ms
retrieving fields ... transfer complete: 63691 ms
normalizing raw data ... source 1, normalization factor
alpha=0.000000
data normalization complete : 63698 ms
simulated 100000000 photons (100000000) with 98304 threads
(repeat x1)
MCX simulation speed: 1570.67 photon/ms
total simulated energy: 99987796.00 absorbed: 33.10317%
(loss due to initial specular reflection is excluded in the
total)
--------------------------------
GPU=1 (NVIDIA GeForce RTX 5090) threadph=143 extra=426240
np=100000000 nthread=696320 maxgate=1 repetition=1
initializing streams ... init complete : 1 ms
requesting shared memory: 1280 bytes
launching MCX simulation for time window [0.00e+00ns 5.00e+00ns]
...
simulation run# 1 ...
kernel complete: 10792 ms
retrieving fields ... transfer complete: 10797 ms
normalizing raw data ... source 1, normalization factor
alpha=0.000000
data normalization complete : 10816 ms
simulated 100000000 photons (100000000) with 696320 threads
(repeat x1)
MCX simulation speed: 9359.79 photon/ms
total simulated energy: 99998474.00 absorbed: 33.09943%
(loss due to initial specular reflection is excluded in the
total)
--------------------------------
GPU=1 (NVIDIA TITAN V) threadph=610 extra=57600
np=100000000 nthread=163840 maxgate=1 repetition=1
initializing streams ... init complete : 1 ms
requesting shared memory: 1280 bytes
launching MCX simulation for time window [0.00e+00ns 5.00e+00ns]
...
simulation run# 1 ...
kernel complete: 64545 ms
retrieving fields ... transfer complete: 64546 ms
normalizing raw data ... source 1, normalization factor
alpha=0.000000
data normalization complete : 64550 ms
simulated 100000000 photons (100000000) with 163840 threads
(repeat x1)
MCX simulation speed: 1549.83 photon/ms
total simulated energy: 99994736.00 absorbed: 33.09635%
(loss due to initial specular reflection is excluded in the
total)
To view this discussion visit https://groups.google.com/d/msgid/mcx-users/a053c191-372a-4d12-86c2-0276ae33736d%40gmail.com.

hi Tamara,
thanks for the follow up. I was indeed able to see the message on my 2080S - I previously missed it because it was printed in the terminal.
I am still in the process of debugging it. It appears to be related to the logic of handling of boundary conditions in the svmc mode.
it happens very rarely, should have negligible impact to the results.
Qianqian
To view this discussion visit https://groups.google.com/d/msgid/mcx-users/b85212d2-9979-4b35-8353-2bdbca735cddn%40googlegroups.com.