Page 1 of 1

Magma Installation: CLAPACK problem

Posted: Sun May 29, 2011 4:04 am
by alexgille

I installed CLAPACK-3.2.1 and ATLAS 3.8.3 without errors. I configured and used the file for the compilation of magma 1.0 RC5 but i have those errors:

Code: Select all

gcc -O3 -DADD_ -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200  testing_zpotrf.o  -o testing_zpotrf lin/liblapacktest.a -L../lib \
          -lcuda -lmagma -lmagmablas -lmagma -L/usr/local/ATLAS/lib -L/usr/local/CLAPACK-3.2.1/F2CLIBS/ -L/usr/local/cuda/lib64  /usr/local/CLAPACK-3.2.1/lapack_LINUX.a -lf77blas -latlas -lcblas -lf2c -lcublas -lm 
/usr/local/CLAPACK-3.2.1/lapack_LINUX.a(zpotrf.o): In function `zpotrf_':
zpotrf.c:(.text+0x263): undefined reference to `f2c_zherk'
zpotrf.c:(.text+0x368): undefined reference to `f2c_zgemm'
zpotrf.c:(.text+0x3e7): undefined reference to `f2c_ztrsm'
zpotrf.c:(.text+0x4dc): undefined reference to `f2c_zherk'
zpotrf.c:(.text+0x60b): undefined reference to `f2c_zgemm'
zpotrf.c:(.text+0x684): undefined reference to `f2c_ztrsm'
/usr/local/CLAPACK-3.2.1/lapack_LINUX.a(zpotf2.o): In function `zpotf2_':
zpotf2.c:(.text+0x1fc): undefined reference to `f2c_zdotc'
zpotf2.c:(.text+0x36b): undefined reference to `f2c_zgemv'
zpotf2.c:(.text+0x3d7): undefined reference to `f2c_zdscal'
zpotf2.c:(.text+0x520): undefined reference to `f2c_zdotc'
zpotf2.c:(.text+0x68f): undefined reference to `f2c_zgemv'
zpotf2.c:(.text+0x6fb): undefined reference to `f2c_zdscal'
collect2: ld returned 1 exit status
make[1]: *** [testing_zpotrf] Erreur 1
rm testing_zpotrf.o testing_zsymv.o testing_zgemv.o testing_zgemm.o testing_zhemv.o
make[1]: quittant le répertoire « /usr/local/magma_1.0.0-rc5/testing »
make: *** [test] Erreur 2
Here is my

Code: Select all

#   -- MAGMA (version 1.0) --
#      Univ. of Tennessee, Knoxville
#      Univ. of California, Berkeley
#      Univ. of Colorado, Denver
#      November 2010

# GPU_TARGET specifies for which GPU you want to compile MAGMA
#      0: Tesla family
#      1: Fermi Family

CC        = gcc
NVCC      = /usr/local/cuda/bin/nvcc
FORT      = gfortran

ARCH      = ar
RANLIB    = ranlib

OPTS      = -O3 -DADD_
FOPTS     = -O3 -DADD_ -x f95-cpp-input
NVOPTS    = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS    = -fPIC -Xlinker -zmuldefs

LIB       = /usr/local/CLAPACK-3.2.1/lapack_LINUX.a \
            -lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR   = /usr/local/cuda

LIBDIR    = -L/usr/local/ATLAS/lib \
            -L/usr/local/CLAPACK-3.2.1/F2CLIBS/ \
INC       = -I$(CUDADIR)/include

LIBMAGMA     = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a
Does anybody knows how to solve this problem ?


Re: Magma Installation: CLAPACK problem

Posted: Wed Jun 08, 2011 3:31 pm
by mateo70

Thansk for rising this. f2c is a very old library used by f77 when you mix C and Fortran. gfortran doesn't use it anymore. It uses -lgfortran instead and is automatically added normally.
So just remove the -lf2c from the LIB variable.