I create a version of magma_init to initialise only few GPU :
Code: Select all
magma_int_t magma_init( int nb_devices=0, magma_device_t *devices=NULL)So instead using the 16 GPU for one simulation, we wanted to launch 4 simulations on 4 GPU.
If you call magma_init( ) without arguments, it will generate the correct array calling magma_getdevices method (initialisation to [0,1,2,...,nb_devices-1])
If you call it with correct arguments, if will use the devices argument.
I take care to change magma_setdevice and magma_getdevice method.
It saves resources on used GPU (~100MB) and makes the nvidia-smi more readable
Any comments are welcome.
Arnaud