MAGMA 1.0rc5 with cuda/4.0

Open discussion for MAGMA

MAGMA 1.0rc5 with cuda/4.0

Postby wsawyer » Thu Jul 28, 2011 5:17 am

I am now trying to move all our software to cuda/4.0. I've noticed that at least one testing routine does not compile:

gcc -O3 -DADD_ -DGPUSHMEM=130 -fPIC -nofor_main -Xlinker -zmuldefs -DGPUSHMEM=130 testing_zgemm.o -o testing_zgemm lin/liblapacktest.a -L../lib \
-lcuda -lmagma -lmagmablas -lmagma -L/apps/eiger/Intel-FOR-11.1/mkl/lib/em64t -L/apps/eiger/Cuda-4.0/cuda//lib64 -lcuda -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -fopenmp -lcublas -lm
gcc: unrecognized option '-nofor_main'
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0x4f): undefined reference to `cuCtxCreate_v2'

Is this a known problem?

Thanks, --Will
wsawyer
 
Posts: 7
Joined: Mon Jun 07, 2010 7:43 am

Re: MAGMA 1.0rc5 with cuda/4.0

Postby Stan Tomov » Thu Jul 28, 2011 10:40 am

Hi Will,
I think this happens sometimes when there are multiple CUDA versions installed on a machine - most probably due to some mix-up of include files (from the different CUDA versions), already compiled files with the old CUDA, or setting of environment variables like LD_LIBRARY_PATH even during the linking.
Usually make cleanall all fixes it. I also went on eiger and everything went through by executing
Code: Select all
module load mkl cuda
qsub -I -l select=1:ncpus=12:mem=1gb:gpu=fermi -l cput=01:30:00,walltime=01:30:00  -q feed@eiger170
cd magma_1.0.0-rc5
make cleanall all

The make.inc that I used is
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
#
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 -nofor_main -Xlinker -zmuldefs

LIB       = -lcuda -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core \
            -lpthread -fopenmp -lcublas -lm

CUDADIR   = /apps/eiger/Cuda-4.0/cuda/

LIBDIR    = -L/apps/eiger/Intel-FOR-11.1/mkl/lib/em64t \
            -L$(CUDADIR)/lib64
INC       = -I$(CUDADIR)/include

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


I see that you must have used GPU_TARGET = 0 (i.e., not Fermi). Was this your intent?

Best regards,
Stan
Stan Tomov
 
Posts: 251
Joined: Fri Aug 21, 2009 10:39 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron