Magma 1.1.0 building problems w/ testing

Open discussion for MAGMA

Magma 1.1.0 building problems w/ testing

Postby fulvio » Tue Dec 27, 2011 11:39 am

Hello All,

I am experiencing a building problem when entering the testing directory. In the following I paste the messages:

(...)
make[1]: Entering directory `/home/administrator/Downloads/magma_1.1.0/testing'
cd lin && make liblapacktest.a
make[2]: Entering directory `/home/administrator/Downloads/magma_1.1.0/testing/lin'
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zbdt01.f -o zbdt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zget22.f -o zget22.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zhet21.f -o zhet21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zhst01.f -o zhst01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zunt01.f -o zunt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zqrt02.f -o zqrt02.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zlarfy.f -o zlarfy.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c zstt21.f -o zstt21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c cbdt01.f -o cbdt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c cget22.f -o cget22.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c chet21.f -o chet21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c chst01.f -o chst01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c cunt01.f -o cunt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c cqrt02.f -o cqrt02.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c clarfy.f -o clarfy.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c cstt21.f -o cstt21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dbdt01.f -o dbdt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dget22.f -o dget22.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dsyt21.f -o dsyt21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dhst01.f -o dhst01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dort01.f -o dort01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dqrt02.f -o dqrt02.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dlarfy.f -o dlarfy.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c dstt21.f -o dstt21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c sbdt01.f -o sbdt01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c sget22.f -o sget22.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c ssyt21.f -o ssyt21.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c shst01.f -o shst01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c sort01.f -o sort01.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c sqrt02.f -o sqrt02.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c slarfy.f -o slarfy.o
ifort -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../../quark/include -c sstt21.f -o sstt21.o
ar cr liblapacktest.a zbdt01.o zget22.o zhet21.o zhst01.o zunt01.o zqrt02.o zlarfy.o zstt21.o cbdt01.o cget22.o chet21.o chst01.o cunt01.o cqrt02.o clarfy.o cstt21.o dbdt01.o dget22.o dsyt21.o dhst01.o dort01.o dqrt02.o dlarfy.o dstt21.o sbdt01.o sget22.o ssyt21.o shst01.o sort01.o sqrt02.o slarfy.o sstt21.o
ranlib liblapacktest.a
make[2]: Leaving directory `/home/administrator/Downloads/magma_1.1.0/testing/lin'
gcc -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../quark/include -c testing_zgemm.cpp -o testing_zgemm.o
gcc -O3 -DADD_ -DGPUSHMEM=130 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=130 testing_zgemm.o -o testing_zgemm lin/liblapacktest.a -L../lib \
-lcuda -lmagma -lmagmablas -lmagma -L/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64 -L/usr/local/cuda/lib64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack95_lp64 -lmkl_core -lpthread -lcublas -lcudart -lm
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_thread_num'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_threads'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_procs'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `ompc_set_nested'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_nested'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_4'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_in_parallel'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_max_threads'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'
/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
rm testing_zgemm.o
make[1]: Leaving directory `/home/administrator/Downloads/magma_1.1.0/testing'
make: *** [test] Error 2

I am compiling on:
Linux 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 16:11:24 UTC 2011 x86_64 GNU/Linux

I successfully installed the latest Intel Fortran environment. My make.inc is as follows:

########## Start of make.inc

#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.1) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# November 2011
#//////////////////////////////////////////////////////////////////////////////

#
# 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 = ifort

ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

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

LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack95_lp64 -lmkl_core -lpthread -lcublas -lcudart -lm

CUDADIR = /usr/local/cuda

LIBDIR = -L$(MKLROOT)/lib/intel64 \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

#LIBMAGMA = $(MAGMA_DIR)/lib/magma.a
#LIBMAGMABLAS = $(MAGMA_DIR)/lib/magmablas.a

########## End of make.inc

Any suggestion for the reason I get this linking error?

Regards,

Fulvio
fulvio
 
Posts: 1
Joined: Tue Dec 27, 2011 11:31 am

Re: Magma 1.1.0 building problems w/ testing

Postby fletchjp » Wed Dec 28, 2011 5:53 am

I am sorry I cannot be specific as I don't have mkl. I think it is deep in the MKL code and maybe the MKL manual can help. I have had trouble getting the linking order correct for mkl - I suggest you experiment.

Someone else may be able to spot the specific problem.

John
fletchjp
 
Posts: 175
Joined: Mon Dec 27, 2010 7:29 pm

Re: Magma 1.1.0 building problems w/ testing

Postby mgates3 » Sat Jan 14, 2012 11:47 am

The omp_get_num_threads is from missing openmp, I believe from a quick web search. Unfortunately, the Intel MKL libraries vary between different versions.

Using gcc and MKL, I currently use:
LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lcublas -lm -fopenmp
and
LIBDIR = -L${MKLROOT}/lib/intel64 -L$(CUDADIR)/lib64

where $MKLROOT and $CUDADIR are system-specific locations where you have installed MKL and CUDA. For example, if installed in /usr/local, they might look like:

> echo $MKLROOT
/usr/local/sw/intel/2011.2.137/composerxe-2011.2.137/mkl
> ls $MKLROOT/
benchmarks/ bin/ examples/ include/ interfaces/ lib/ tests/ tools/

> echo $CUDADIR
/usr/local/cuda
> ls $CUDADIR/
bin/ computeprof/ CUDAToolsSDK/ doc/ include/ lib/ lib64/ open64/ src/

The Intel MKL link advisor may also be helpful.
http://software.intel.com/en-us/article ... e-advisor/

-mark
mgates3
 
Posts: 428
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 5 guests