I am trying to replace LAPACK dgesv with magma_dsgesv_gpu but I am having difficulty getting the magma version to compile. I am using a pgf90 compiler.
I have loaded a module containing magma/0.2 and put the appropriate links to the magma library in my program's Makefile.
When I try just replacing dgesv with magma_dsgesv_gpu the compiler says I have an undefined reference to `magma_dsgesv_gpu_'. I have tried the -nosecond_underscore compile option with this and get the same error.
I tired to use a C$PRAGMA like so:
C$PRAGMA C(magma_dsgesv_gpu)
call magma_dsgesv_gpu(ny,1,am,ny,indx,f,ny,info) ! Double precision version
dy=f
With that, the compiler recognizes magma_dsgesv_gpu but can not find functions with in it. I get this error message:
pgf90 -mp -fastsse -fpic -r8 -o xnet data.o common.o ffn.o full_net.o match.o net.o flux.o eosnom90.o screen.o jacobian_dense.o -L/sw/analysis-x64/magma/0.2/sl5.0_cuda_2.3/lib -lmagma -lmagmablas
/sw/analysis-x64/magma/0.2/sl5.0_cuda_2.3/lib/libmagma.a(dsgesv_gpu.o): In function `magma_dsgesv_gpu':
dsgesv_gpu.cpp:(.text+0xbf): undefined reference to `dlamch_'
dsgesv_gpu.cpp:(.text+0x127): undefined reference to `slamch_'
dsgesv_gpu.cpp:(.text+0x47b): undefined reference to `cublasIdamax'
dsgesv_gpu.cpp:(.text+0x4c0): undefined reference to `cublasGetMatrix'
dsgesv_gpu.cpp:(.text+0x4ea): undefined reference to `cublasIdamax'
dsgesv_gpu.cpp:(.text+0x52a): undefined reference to `cublasGetMatrix'
dsgesv_gpu.cpp:(.text+0x6e2): undefined reference to `cublasIdamax'
dsgesv_gpu.cpp:(.text+0x727): undefined reference to `cublasGetMatrix'
dsgesv_gpu.cpp:(.text+0x751): undefined reference to `cublasIdamax'
dsgesv_gpu.cpp:(.text+0x791): undefined reference to `cublasGetMatrix'
/sw/analysis-x64/magma/0.2/sl5.0_cuda_2.3/lib/libmagma.a(dsgesv_gpu.o):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
/sw/analysis-x64/magma/0.2/sl5.0_cuda_2.3/lib/libmagma.a(dgemm_gpu.o): In function `magmablas_dgemm':
.... And it goes on.
What else can I try to get this to compile ?
