Error: out of memory in MCXlab

182 views
Skip to first unread message

ALEXANDER P. Dumont

unread,
Jun 28, 2016, 10:23:37 AM6/28/16
to mcx-users
Hi Dr. Fang

When I run my simulations with mcxlab, I get a weird error:

MCXLAB ERROR -2 in unit mcx_core.cu:1090
Error: out of memory

I have attached my script., but it uses an order of magnitude less photons than the limit, so I do not really understand why i am getting this errror. Also, my system currently has 32 gb of ram so I do not think it can be from that. 
varythicknessofmedia.m

Qianqian Fang

unread,
Jun 28, 2016, 12:21:25 PM6/28/16
to mcx-...@googlegroups.com
since the complain happens inside mcx_core.cu, so, mcxlab
was likely complaining about GPU memory, not the host
or CPU memory.

if you run

gpuinfo=mcxlab('gpuinfo');

it will return the GPU memory specs.

Generally, even a low-end GPU can run MCX without memory issues
unless you simulate a huge number of time gates (because the global
memory needed by MCX is largely sizeof(float) x size of volume x
number of time gates).

Skimming through your script, I noticed that your # of time gate is just
1. However, your tend/tstep are .5 seconds! Typically, for small domains,
time gates of width on the scale of ns are more than sufficient. There is
no need to use such a long time period. Also after several ns, the photon
weights will be close to numerical zero. So, there is really no contribution
from running it for long time.

Perhaps you can fix this and see if you are getting the same error.

By the way, which mcxlab release are you using? I do not see Line#1090
in the current mcx_core.cu, so I suspect you were using an old release.

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.

ALEXANDER P. Dumont

unread,
Jun 28, 2016, 1:10:00 PM6/28/16
to mcx-users
WHen I run mcxlab('gpuinfo')
I get back:

   name: 'Quadro M5000'
            id: 1
      devcount: 1
         major: 5
         minor: 2
     globalmem: 8.5899e+09
      constmem: 65536
     sharedmem: 49152
      regcount: 65536
         clock: 1038000
            sm: 16
          core: 2048
     autoblock: 64
    autothread: 32768
       maxgate: 0

>> 
This is a state of the art gpu I am working with, I am struggling to see how it would be running out of memory. I have downlaoded the latest to see if that hasa fixed the problem, I will tell you how it goes.

ALEXANDER P. Dumont

unread,
Jun 28, 2016, 1:11:50 PM6/28/16
to mcx-users
I downloaded your most recent file for mcxlab. It still returns 

MCXLAB ERROR -2 in unit mcx_core.cu:1090
Error: out of memory

Cody Swain

unread,
Aug 28, 2018, 6:39:06 PM8/28/18
to mcx-users
Did you ever figure out what gave you that error? I am running into the same issue

Qianqian Fang

unread,
Aug 29, 2018, 11:24:46 PM8/29/18
to mcx-...@googlegroups.com, Cody Swain

hi Cody

your quoted post was from 2016. can you post the full error message?

if it  says out of memory, it probably just means exactly that, the
array you created (cfg.vol) probably has a large size or the time
gates is too fine for the GPU memory to store.

Qianqian

Reply all
Reply to author
Forward
0 new messages