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
magma_dmalloc
Re: magma_dmalloc
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
-mark