magma_dmalloc

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
dalal
Posts: 14
Joined: Thu Feb 20, 2014 4:30 am

magma_dmalloc

Post by dalal » Mon Apr 06, 2015 10:31 am

Hallo every one,

I would like to know how to get more efficient memory allocation on multiple mics. The following part of my code is a bottleneck, is taking 25% of the running time, mainly the following loop runs sequentially.

for(long i = 0; i < nmics; i++)
{
magma_setdevice(mic_id);
if (MAGMA_SUCCESS != magma_dmalloc( &mic_ws, mem_space )) {
e = MAGMA_ERR_DEVICE_ALLOC;
for(long j = 0; j <= i; j++) { if(mic_ws) magma_free(mic_ws); }
printf("magma_dmalloc returned error %d: %s.\n",
(int) e, magma_strerror( e ));
exit(1);
}
}

Any help is appreciated.
Thanks

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: magma_dmalloc

Post by mgates3 » Tue Apr 14, 2015 12:46 am

How many MIC cards do you have, and what size are you trying to allocate? After the allocation, what else are you doing (LU, Cholesky, eigenvalue, etc.)?

-mark

Post Reply