Unable to recompile magma 1.2.1
Posted: Tue Aug 13, 2013 12:15 pm
Hi,
I have been unable to recompile magma-1.2.1 from the original installation I had. Everything started with the automatic shutdown of the workstation. Once reinitiated, someone installed cuda 5.5. Now we have 3 versions of CUDA: CUDA, CUDA-4.5 and CUDA-5.5 in /usr/local. For some reason, when I tried to recompile my former program that uses magma it failed with the warning:
============================================================================================
cc -I/usr/local/cuda/include -I/home/jivifair/src/magma-1.2.1/include -c -o fortran.o /usr/local/cuda/src/fortran.c
In file included from /usr/local/cuda/src/fortran.c:67:
/usr/local/cuda/src/fortran_common.h:405:2: error: #error unsupported Fortran compiler
make: *** [fortran.o] Error 1
============================================================================================
So I made 'make clean' in /home/jivifair/src/magma-1.2.1 and tried to recompile magma from here using again 'make'.
When I do it, everything seems to work fine except this step:
============================================================================================
.......
.......
make[2]: Leaving directory `/home/jivifair/src/magma-1.2.1/testing/lin'
gcc -O3 -DADD_ -DHAVE_CUBLAS -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../control -c testing_zgemm.cpp -o testing_zgemm.o
gcc -fPIC -Xlinker -zmuldefs -DGPUSHMEM=130 testing_zgemm.o -o testing_zgemm \
lin/liblapacktest.a -L../lib -lmagma -lmagmablas -lmagma \
-L/usr/lib64/atlas -L/usr/local/cuda/lib64 \
-lf77blas -llapack -latlas -lcblas -lcublas -lm
../lib/libmagma.a(auxiliary.o): In function `printout_devices':
auxiliary.cpp:(.text+0x242): undefined reference to `cudaGetDeviceCount'
auxiliary.cpp:(.text+0x299): undefined reference to `cudaGetDeviceProperties'
../lib/libmagma.a(auxiliary.o): In function `magma_num_gpus':
auxiliary.cpp:(.text+0x318): undefined reference to `cudaGetDeviceCount'
../lib/libmagma.a(auxiliary.o): In function `magma_is_devptr':
auxiliary.cpp:(.text+0x3e4): undefined reference to `cudaGetDevice'
auxiliary.cpp:(.text+0x3f7): undefined reference to `cudaGetDeviceProperties'
auxiliary.cpp:(.text+0x400): undefined reference to `cudaGetLastError'
auxiliary.cpp:(.text+0x429): undefined reference to `cudaPointerGetAttributes'
auxiliary.cpp:(.text+0x446): undefined reference to `cudaGetLastError'
../lib/libmagma.a(timer.o): In function `get_current_time':
timer.cpp:(.text+0x65): undefined reference to `cudaDeviceSynchronize'
../lib/libmagma.a(zset_get.o): In function `magma_zcopymatrix_async':
zset_get.cpp:(.text+0x3a): undefined reference to `cudaMemcpy2DAsync'
../lib/libmagma.a(zset_get.o): In function `magma_zcopymatrix':
zset_get.cpp:(.text+0x8f): undefined reference to `cudaMemcpy2D'
../lib/libmagma.a(alloc.o): In function `magma_free_pinned':
alloc.cpp:(.text+0x2): undefined reference to `cudaFreeHost'
../lib/libmagma.a(alloc.o): In function `magma_malloc_pinned':
alloc.cpp:(.text+0x35): undefined reference to `cudaMallocHost'
../lib/libmagma.a(alloc.o): In function `magma_free':
alloc.cpp:(.text+0x82): undefined reference to `cudaFree'
../lib/libmagma.a(alloc.o): In function `magma_malloc':
alloc.cpp:(.text+0xb5): undefined reference to `cudaMalloc'
../lib/libmagma.a(error.o): In function `magma_xerror(cudaError, char const*, char const*, int)':
error.cpp:(.text+0x3c7): undefined reference to `cudaGetErrorString'
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
make[1]: Leaving directory `/home/jivifair/src/magma-1.2.1/testing'
make: *** [test] Error 2
============================================================================================
My make.inc is the following:
============================================================================================
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.2.1) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# June 2012
#//////////////////////////////////////////////////////////////////////////////
#
# GPU_TARGET specifies for which GPU you want to compile MAGMA:
# "Tesla" (NVIDIA compute capability 1.x cards)
# "Fermi" (NVIDIA compute capability 2.x cards)
# See http://developer.nvidia.com/cuda-gpus
GPU_TARGET = Tesla
CC = gcc
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
OPTS = -O3 -DADD_
F77OPTS = -O3 -DADD_
FOPTS = -O3 -DADD_ -x f95-cpp-input
NVOPTS = -O3 -DADD_ --compiler-options -fno-strict-aliasing -DUNIX
LDOPTS = -fPIC -Xlinker -zmuldefs
#LIB = -lf77blas -latlas -lcblas -lf2c -lcublas -lm
LIB = -lf77blas -llapack -latlas -lcblas -lcublas -lm
CUDADIR = /usr/local/cuda
LIBDIR = -L/usr/lib64/atlas -L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include
============================================================================================
Is it an interference with the cuda-5.5? How can I fix this bug and reinstall again magma?
Thanks in advance,
Adrian O.
I have been unable to recompile magma-1.2.1 from the original installation I had. Everything started with the automatic shutdown of the workstation. Once reinitiated, someone installed cuda 5.5. Now we have 3 versions of CUDA: CUDA, CUDA-4.5 and CUDA-5.5 in /usr/local. For some reason, when I tried to recompile my former program that uses magma it failed with the warning:
============================================================================================
cc -I/usr/local/cuda/include -I/home/jivifair/src/magma-1.2.1/include -c -o fortran.o /usr/local/cuda/src/fortran.c
In file included from /usr/local/cuda/src/fortran.c:67:
/usr/local/cuda/src/fortran_common.h:405:2: error: #error unsupported Fortran compiler
make: *** [fortran.o] Error 1
============================================================================================
So I made 'make clean' in /home/jivifair/src/magma-1.2.1 and tried to recompile magma from here using again 'make'.
When I do it, everything seems to work fine except this step:
============================================================================================
.......
.......
make[2]: Leaving directory `/home/jivifair/src/magma-1.2.1/testing/lin'
gcc -O3 -DADD_ -DHAVE_CUBLAS -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../control -c testing_zgemm.cpp -o testing_zgemm.o
gcc -fPIC -Xlinker -zmuldefs -DGPUSHMEM=130 testing_zgemm.o -o testing_zgemm \
lin/liblapacktest.a -L../lib -lmagma -lmagmablas -lmagma \
-L/usr/lib64/atlas -L/usr/local/cuda/lib64 \
-lf77blas -llapack -latlas -lcblas -lcublas -lm
../lib/libmagma.a(auxiliary.o): In function `printout_devices':
auxiliary.cpp:(.text+0x242): undefined reference to `cudaGetDeviceCount'
auxiliary.cpp:(.text+0x299): undefined reference to `cudaGetDeviceProperties'
../lib/libmagma.a(auxiliary.o): In function `magma_num_gpus':
auxiliary.cpp:(.text+0x318): undefined reference to `cudaGetDeviceCount'
../lib/libmagma.a(auxiliary.o): In function `magma_is_devptr':
auxiliary.cpp:(.text+0x3e4): undefined reference to `cudaGetDevice'
auxiliary.cpp:(.text+0x3f7): undefined reference to `cudaGetDeviceProperties'
auxiliary.cpp:(.text+0x400): undefined reference to `cudaGetLastError'
auxiliary.cpp:(.text+0x429): undefined reference to `cudaPointerGetAttributes'
auxiliary.cpp:(.text+0x446): undefined reference to `cudaGetLastError'
../lib/libmagma.a(timer.o): In function `get_current_time':
timer.cpp:(.text+0x65): undefined reference to `cudaDeviceSynchronize'
../lib/libmagma.a(zset_get.o): In function `magma_zcopymatrix_async':
zset_get.cpp:(.text+0x3a): undefined reference to `cudaMemcpy2DAsync'
../lib/libmagma.a(zset_get.o): In function `magma_zcopymatrix':
zset_get.cpp:(.text+0x8f): undefined reference to `cudaMemcpy2D'
../lib/libmagma.a(alloc.o): In function `magma_free_pinned':
alloc.cpp:(.text+0x2): undefined reference to `cudaFreeHost'
../lib/libmagma.a(alloc.o): In function `magma_malloc_pinned':
alloc.cpp:(.text+0x35): undefined reference to `cudaMallocHost'
../lib/libmagma.a(alloc.o): In function `magma_free':
alloc.cpp:(.text+0x82): undefined reference to `cudaFree'
../lib/libmagma.a(alloc.o): In function `magma_malloc':
alloc.cpp:(.text+0xb5): undefined reference to `cudaMalloc'
../lib/libmagma.a(error.o): In function `magma_xerror(cudaError, char const*, char const*, int)':
error.cpp:(.text+0x3c7): undefined reference to `cudaGetErrorString'
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
make[1]: Leaving directory `/home/jivifair/src/magma-1.2.1/testing'
make: *** [test] Error 2
============================================================================================
My make.inc is the following:
============================================================================================
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.2.1) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# June 2012
#//////////////////////////////////////////////////////////////////////////////
#
# GPU_TARGET specifies for which GPU you want to compile MAGMA:
# "Tesla" (NVIDIA compute capability 1.x cards)
# "Fermi" (NVIDIA compute capability 2.x cards)
# See http://developer.nvidia.com/cuda-gpus
GPU_TARGET = Tesla
CC = gcc
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
OPTS = -O3 -DADD_
F77OPTS = -O3 -DADD_
FOPTS = -O3 -DADD_ -x f95-cpp-input
NVOPTS = -O3 -DADD_ --compiler-options -fno-strict-aliasing -DUNIX
LDOPTS = -fPIC -Xlinker -zmuldefs
#LIB = -lf77blas -latlas -lcblas -lf2c -lcublas -lm
LIB = -lf77blas -llapack -latlas -lcblas -lcublas -lm
CUDADIR = /usr/local/cuda
LIBDIR = -L/usr/lib64/atlas -L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include
============================================================================================
Is it an interference with the cuda-5.5? How can I fix this bug and reinstall again magma?
Thanks in advance,
Adrian O.