Timothy Kaiser
unread,Dec 6, 2022, 10:37:44 AM12/6/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MAGMA User
Running the Fortran and C++ examples magma-2.7 2.0/example/[example_f.F90,example_v1.cpp]
I note that the Fortran example fails if I try to run GPU 1 instead of GPU 0. The C++
example works fine on either GPU. These examples call the Fortran and C++ versions of
magma_zgesv_gpu.
These were run on a machine that has two V100 cards, Intel compilers, gcc 10.x, Cuda 7.x.
I was able to see that the Fortran version started a process on each of the GPUs but the
C++ version only started a process on either 0 or 1. It looks like something in this
routine has GPU 0 hard coded.
I modified the two codes to read the GPU id and then call the Fortran and C++ versions of
magma_setdevice(id). Can someone try to replicate this?
Here are the mods and results:
**** example_f.F90 ****
integer id
call magmaf_init()
read(*,*)id
write(*,*)"setting gpu to ",id
call magmaf_setdevice(id)
[tkaiser2@r103u21 example]$ ./example_f
0
setting gpu to 0
using MAGMA CPU interface
using MAGMA GPU interface
[tkaiser2@r103u21 example]$ ./example_f
1
setting gpu to 1
using MAGMA CPU interface
using MAGMA GPU interface
magma_zgesv_gpu failed with info= -112
Error: magmaf_free( dA ) failed: -115
Error: magmaf_free( dX ) failed: -115
[tkaiser2@r103u21 example]$
**** example_v1.cpp ****
magma_device_t id;
id=1;
scanf("%d",&id);
printf("setting gpu to %d\n",id);
magma_setdevice(id);
[tkaiser2@r103u21 example]$ ./example_v1
1
setting gpu to 1
using MAGMA CPU interface
using MAGMA GPU interface
[tkaiser2@r103u21 example]$ ./example_f
0
setting gpu to 0
using MAGMA CPU interface
using MAGMA GPU interface
[tkaiser2@r103u21 example]$