memory leak in clforka()?

Moderator: dar

memory leak in clforka()?

Postby pharaoh » Sun Jan 17, 2016 1:22 pm

i implemented Game Of Life on my parallella with STDCL and it works do far. But it seems, clforka() has a memory leak.

i call clforka() in a loop to evolve the world (one call evolves the whole world one step further):

while(generation < GENERATIONS) {
clforka(cp, devnum, krn, &ndr, CL_EVENT_WAIT, width, height, current_world, new_world);
ptr = new_world;
new_world = current_world;
current_world = ptr;
}

after some interations (about 95) i get

gol: e_alloc(): mmap failure.
gol:
ERROR: Can't allocate external memory buffer!

because the host process reached the 3GB process limit. Has anyone the same issue and can confirm it?

I will reimplement it using OpenCL, maybe it's a STDCL issue.
pharaoh
 
Posts: 6
Joined: Sat Jan 16, 2016 1:37 pm

Re: memory leak in clforka()?

Postby pharaoh » Sun Jan 17, 2016 1:40 pm

Same problem with OpenCL. I found some posts about this issue ("problem with COPRTHR and newer ESDK"). It's really a pity, because with this huge memory leak the parallella is more or less useless to me. I will try to contact the COPRTHR developers, but it seems to be awful quiet around COPRTHR and ESDK, not much activity.
pharaoh
 
Posts: 6
Joined: Sat Jan 16, 2016 1:37 pm

Re: memory leak in clforka()?

Postby jar » Mon Jan 18, 2016 4:48 am

The leak is not within COPRTHR. Until it's fixed, you can work around it with persistent threads. Basically, move your loop code into the kernel so that you don't have to return to the host. It will be higher performance also.
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am

Re: memory leak in clforka()?

Postby pharaoh » Mon Jan 18, 2016 7:09 pm

yes, you're right, it's not clforka(), it's a bug in e_free(), the solution is there: viewtopic.php?f=48&t=3406
pharaoh
 
Posts: 6
Joined: Sat Jan 16, 2016 1:37 pm


Return to OpenCL

Who is online

Users browsing this forum: MSN [Bot] and 1 guest