the error was raised on line 3006 of mcx_core.cu, which reads
https://github.com/fangq/mcx/blob/v2024.2/src/mcx_core.cu#L3006
this is the line where the main volumetric output array, gfield,
on the GPU is allocated.
the needed size of the output array is explained in
https://github.com/fangq/mcx?tab=readme-ov-file#requirement-and-installation
"For simulations with large volumes, sufficient graphics
memory is also required to perform the simulation. The minimum
amount of graphics memory required for a MC simulation is
Nx*Ny*Nz bytes for the input tissue data plus Nx*Ny*Nz*Ng*4*2
bytes for the output flux/fluence data - where Nx,Ny,Nz are the
dimensions of the tissue volume, Ng is the number of concurrent
time gates, 4 is the size of a single-precision floating-point
number, 2 is for the extra memory needed to ensure output
accuracy (#41). MCX does not require double-precision support in
your hardware."
let's do the math in your case
your domain volume is Nx=Ny=Nz=200, your time-gate Nt=tend/tstep = 1e-8/2e-11=500. the total bytes just for the volumetric output alone is 200*200*200*500*4*2=30GB.
each of your GPU has a max 40GB global memory, but there are other programs (run nvidia-smi to list all programs using the GPU) and other smaller variables needed by mcx. In the end, it is not surprising it raise this error.
a related question is what spatial resolution and temporary resolution is sufficient for your simulation? can yo work with a 100x100x100 volume? do you really need 2e-11 as your tstep?
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 view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/305cd539-b0ee-4b91-886c-b86241a92b95n%40googlegroups.com.