Page 1 of 1

Compilation of MAGMA with PGI for CUDA F

PostPosted: Thu Apr 12, 2012 9:33 am
by amarek
Hi all,

first: a build with Intel compiler and GNU compiler works fine.

I tried to compile MAGMA for a NVIDIA Fermi with the PGI compiler (for usage with CUDA FORTRAN). Thus I set

However, then I obtain
gcc -O3 -DADD_ -DGPUSHMEM=200 -I/usr/cuda/4.1/include -I../include -I../quark/include -c magma_zf77pgi.cpp -o magma_zf77pgi.o
magma_zf77pgi.cpp: In function ‘void magma_zgebrd_(magma_int_t*, magma_int_t*, double2*, magma_int_t*, double*, double*, double2*, double2*, double2*, magma_int_t*, double2*, magma_int_t*)’:
magma_zf77pgi.cpp:87: error: cannot convert ‘double2*’ to ‘magma_int_t*’ for argument ‘11’ to ‘magma_int_t magma_zgebrd(magma_int_t, magma_int_t, cuDoubleComplex*, magma_int_t, double*, double*, cuDoubleComplex*, cuDoubleComplex*, cuDoubleComplex*, magma_int_t, magma_int_t*)’

Not setting PGIFORTRAN = 1 results in a partial successful build, BUT only test of "cpp" routines are build and are passed. All Fortran tests fail with sth. like
icc -O3 -DADD_ -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200 testing_zgebrd.o -o testing_zgebrd lin/liblapacktest.a -L../lib \
-lcuda -lmagma -lmagmablas -lmagma -L/afs/@cell/common/soft/intel/Compiler/11.1/c/mkl/lib/intel64 -L/usr/cuda/4.1/lib64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack -lmkl_core -lguide -lpthread -lcublas -lcudart -lm
lin/liblapacktest.a(zbdt01.o): In function `.C1_292':
zbdt01.f:(.data+0x50): undefined reference to `pgf90_compiled'
lin/liblapacktest.a(zunt01.o): In function `.C1_292':

Does anybody have an idea, how to correctly build MAGMA with PGI compiler for CUDA FORTRAN?

Thanks a lot!

Re: Compilation of MAGMA with PGI for CUDA F

PostPosted: Mon Jul 09, 2012 2:32 am
by arom

I faced with the same problem. I failed to compile MAGMA with PGI.

it looks like you have to compile MAGMA with GNU compiler tools and write an appropriate interfaces for them