problems compiling magma 1.0 with atlas 3.8.0

Open discussion for MAGMA

problems compiling magma 1.0 with atlas 3.8.0

Postby itabhiyanta » Wed May 25, 2011 11:13 am

Hi

i am trying to compile magma against atlas 3.8.0 and cuda3.2 for a fermi/tesla machine in a linux environment.

i seem to be getting the following errors

/home/nw/gupta/ATLAS_3.8.0/Linux_64/lib/libf77blas.a(xerbla.o): In function `xerbla_':
xerbla.f:(.text+0x51): undefined reference to `_gfortran_st_write'
xerbla.f:(.text+0x61): undefined reference to `_gfortran_transfer_character'
xerbla.f:(.text+0x71): undefined reference to `_gfortran_transfer_integer'
xerbla.f:(.text+0x79): undefined reference to `_gfortran_st_write_done'
xerbla.f:(.text+0x83): undefined reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status
make[1]: *** [testing_zsymv] Error 1
rm testing_zsymv.o testing_zgemv.o testing_zgemm.o testing_zhemv.o
make[1]: Leaving directory `/mnt/nw-node1/nw/gupta/magma_1.0/testing'
make: *** [test] Error 2


i am also attaching my make.inc file.

Please suggest how can i compile the library and also the testing functions since i wish to use dpotrf and dpotrs _gpu versions and in magma 0.2 release they give a segmentation fault when i try to test them. SO i moved to magma 1.0.

thanks and regards

rohit

**************************************************************
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.0) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# November 2010
#
# Contributed by: Allan Menezes (Ontario, Canada)
#//////////////////////////////////////////////////////////////////////////////

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

CC = gcc
NVCC = nvcc
FORT = gfortran

ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

OPTS = -O3 -DADD_
NVOPTS = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS = -fPIC -Xlinker -zmuldefs

LIB = -L/opt64/lapack-3.2/lapack_LINUX.a \
-llapack -lcblas -lf77blas -latlas -lf2c -lcublas -lm

CUDADIR = /opt64/cuda-3.2/cuda/
LIBDIR = -L/home/nw/gupta/ATLAS_3.8.0/Linux_64/lib \
-L/home/nw/gupta/CLAPACK-3.2.1/F2CLIBS/ \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a
**********************************************************************************
itabhiyanta
 
Posts: 11
Joined: Thu Jul 01, 2010 12:12 pm

Re: problems compiling magma 1.0 with atlas 3.8.0

Postby itabhiyanta » Wed May 25, 2011 12:18 pm

hi

i compiled my MAGMA source and then also i get the same error

-lcuda -lmagma -lmagmablas -lmagma -L/home/nw/gupta/ATLAS_3.8.0/Linux_64/lib -L/home/nw/gupta/CLAPACK-3.2.1/F2CLIBS/ -L/opt64/cuda-3.2/cuda//lib64 /opt64/lapack/lapack_LINUX.a -lf77blas -latlas -lcblas -lf2c -lcublas -lm
/opt64/lapack/lapack_LINUX.a(xerbla.o): In function `xerbla_':
xerbla.f:(.text+0x59): undefined reference to `_gfortran_st_write'
xerbla.f:(.text+0x64): undefined reference to `_gfortran_string_len_trim'
xerbla.f:(.text+0x76): undefined reference to `_gfortran_transfer_character'
xerbla.f:(.text+0x86): undefined reference to `_gfortran_transfer_integer'
xerbla.f:(.text+0x8e): undefined reference to `_gfortran_st_write_done'
xerbla.f:(.text+0x98): undefined reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status
make[1]: *** [testing_zsymv] Error 1
rm testing_zsymv.o
make[1]: Leaving directory `/mnt/nw-node1/nw/gupta/magma_1.0/testing'
make: *** [test] Error 2


make.inc follows
************************************************************************************
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.0) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# November 2010
#
# Contributed by: Allan Menezes (Ontario, Canada)
#//////////////////////////////////////////////////////////////////////////////

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

CC = gcc
NVCC = nvcc
FORT = gfortran

ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

OPTS = -O3 -DADD_
NVOPTS = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS = -fPIC -Xlinker -zmuldefs

LIB = /opt64/lapack/lapack_LINUX.a \
-lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR = /opt64/cuda-3.2/cuda/
LIBDIR = -L/home/nw/gupta/ATLAS_3.8.0/Linux_64/lib \
-L/home/nw/gupta/CLAPACK-3.2.1/F2CLIBS/ \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a

************************************************************************************
itabhiyanta
 
Posts: 11
Joined: Thu Jul 01, 2010 12:12 pm

Re: problems compiling magma 1.0 with atlas 3.8.0

Postby itabhiyanta » Thu May 26, 2011 7:53 am

Hi

I also tried with compiling a separate LAPACK library other than a global one available on my system but i still face the same error

/home/nw/gupta/lapack-3.3.1/lapack_LINUX.a(xerbla.o): In function `xerbla':
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:40: undefined reference to `_gfortran_st_write'
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:40: undefined reference to `_gfortran_string_len_trim'
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:40: undefined reference to `_gfortran_transfer_character'
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:40: undefined reference to `_gfortran_transfer_integer'
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:40: undefined reference to `_gfortran_st_write_done'
/home/nw/gupta/lapack-3.3.1/SRC/xerbla.f:42: undefined reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status
make[1]: *** [testing_zsymv] Error 1
rm testing_zsymv.o testing_zgemv.o testing_zgemm.o testing_zhemv.o
make[1]: Leaving directory `/mnt/nw-node1/nw/gupta/magma_1.0.0-rc5/testing'
make: *** [test] Error 2


can some one please help?


in my make file i have the following line for using ATLAS and MAGMA. I use ATLAS for CPU code and MAGMA for comparing it against GPU code.

LIB += -lm -lmagma -lmagmablas -llapack -lcblas -lf77blas -latlas

i am compiling for FERMI (and i have also compiled MAGMA for FERMI)

do you think the error could be because of the use of ATLAS with MAGMA?

thanks in advance. please help me with this issue.

rohit

******************************************************MAKE INC looks like this*******************************************************
GPU_TARGET = 1

CC = gcc
NVCC = nvcc
FORT = gfortran

ARCH = ar
ARCHFLAGS = cr
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 = /home/nw/gupta/lapack-3.3.1/lapack_LINUX.a \
-lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR = /opt64/cuda-3.2/cuda

LIBDIR = -L/home/nw/gupta/ATLAS_3.8.0/Linux_64/lib \
-L/home/nw/gupta/CLAPACK-3.2.1/F2CLIBS/ \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a
***********************************************************************************************************************
itabhiyanta
 
Posts: 11
Joined: Thu Jul 01, 2010 12:12 pm

Re: problems compiling magma 1.0 with atlas 3.8.0

Postby itabhiyanta » Thu May 26, 2011 10:41 am

Hi

One more thing is that as soon as i comment the magma_dpotrf_gpu and magma_dpotrs_gpu functions i do not face any errors in compiling my code.

That means the problem is linked to how these functions are talking to ATLAS.

However i still do not know how to fix the problem.

Please suggest something

rohit
itabhiyanta
 
Posts: 11
Joined: Thu Jul 01, 2010 12:12 pm

Re: problems compiling magma 1.0 with atlas 3.8.0

Postby mateo70 » Thu May 26, 2011 11:57 am

Hi,

Try to add -lgfortran to the LIB variable in the make.inc

Mathieu
mateo70
 
Posts: 41
Joined: Tue Mar 08, 2011 12:38 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron