Hi, Natalia and Mark,
unfortunately, none of the suggestions work in my installation.
I cannot use gfortran, since magma was compiled with nvfortarn, so gfortran does not recognize magma.mod
use magma
| 1
Fatal Error: File ‘/opt/magma/bin/2.9.0/nvf/25.9/include/magma.mod’ opened at (1) is not a GNU Fortran module file
and also cudafor
13 | use cudafor
| 1
Fatal Error: Cannot open module file ‘cudafor.mod’ for reading at (1): No such file or directory
To use gfrotran, I must recompile magma, but at the end this is good for debugging purpose only, since gfortran does not support gpu.
The key point appears to be "magma_devptr_t". If I try the fortran version magmaf_, as from testing_zgetrf_gpu_f, I have
NVFORTRAN-S-0034-Syntax error at or near :: (testing_zgetrf_gpu_f.f90: 23)
NVFORTRAN-S-0034-Syntax error at or near :: (testing_zgetrf_gpu_f.f90: 24)
and the two lines are
magma_devptr_t :: dA, dB, dX, dwork
magma_devptr_t :: queue
If I simply defint dA, dB... as
integer ( kind=8 ), pointer :: dA, dB, dX, dwork
integer ( kind=8 ), pointer :: queue
implicitly following the suggestion by Mark, the code complies but once I run it I have
Segmentation fault (core dumped)
If I remove ",pointer", magically
n nrhs nb error error2 Gflop/s status
100 10 32 0.6273E-18 0.6273E-18 0.0920 ok
200 10 32 0.4941E-18 0.5181E-18 0.0328 ok
300 10 32 0.4094E-18 0.4120E-18 5.8084 ok
400 10 32 0.3657E-18 0.3688E-18 11.8452 ok
500 10 32 0.3812E-18 0.3830E-18 17.0900 ok
600 10 32 0.3945E-18 0.3932E-18 20.6277 ok
700 10 32 0.2965E-18 0.2978E-18 37.1873 ok
800 10 32 0.3567E-18 0.3550E-18 46.4642 ok
900 10 32 0.3151E-18 0.3166E-18 53.3761 ok
1000 10 32 0.3051E-18 0.3049E-18 60.4794 ok
and I have not added the option -Dmagma_devptr_t="integer(kind=8)"
Applying all the corrections to the single precision version (I need), a fast check on a 2x2 matrix appears to be positive
A
2.000000 1.000000
3.000000 4.000000
Inv(A)
0.8000000 -0.2000000
-0.6000000 0.4000000
Thank you very much for all your work!!!
Daniele