I have downloaded MAGMA 1.6.2.
Platform : Ubuntu 14.02 Mint, GTX 690, Intel 15.0 (which includes MKL).
(NOTE : My Intel MKL libs are here : /opt/intel/mkl/lib/intel64)
I used make.inc.mkl-icc-ilp64 for my make.inc baseline. make.inc is below :
Code: Select all
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.6.1) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# @date January 2015
#//////////////////////////////////////////////////////////////////////////////
# GPU_TARGET contains one or more of Tesla, Fermi, or Kepler,
# to specify for which GPUs you want to compile MAGMA:
# Tesla - NVIDIA compute capability 1.x cards (no longer supported in CUDA 6.5)
# Fermi - NVIDIA compute capability 2.x cards
# Kepler - NVIDIA compute capability 3.x cards
# The default is "Fermi Kepler".
# See http://developer.nvidia.com/cuda-gpus
#
#GPU_TARGET ?= Fermi Kepler
CC = icc
CXX = icpc
NVCC = nvcc
FORT = ifort
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
# Use -fPIC to make shared (.so) and static (.a) library;
# can be commented out if making only static library.
FPIC = -fPIC
CFLAGS = -O3 $(FPIC) -DADD_ -Wall -openmp -DMAGMA_SETAFFINITY -DMAGMA_WITH_MKL
FFLAGS = -O3 $(FPIC) -DADD_ -warn all -warn nounused
F90FLAGS = -O3 $(FPIC) -DADD_ -warn all -warn nounused
NVCCFLAGS = -O3 -DADD_ -Xcompiler "-fno-strict-aliasing $(FPIC)"
LDFLAGS = $(FPIC) -openmp
# Defining MAGMA_ILP64 or MKL_ILP64 changes magma_int_t to int64_t in include/magma_types.h
CFLAGS += -DMKL_ILP64
FFLAGS += -fdefault-integer-8
F90FLAGS += -fdefault-integer-8
NVCCFLAGS += -DMKL_ILP64
# Options to do extra checks for non-standard things like variable length arrays;
# it is safe to disable all these
CFLAGS += -pedantic -Wno-long-long
#CFLAGS += -Werror # uncomment to ensure all warnings are dealt with
CXXFLAGS := $(CFLAGS) -std=c++98
CFLAGS += -std=c99
# IMPORTANT: this link line is for 64-bit int !!!!
# For regular 64-bit builds using 64-bit pointers and 32-bit int,
# use the lp64 library, not the ilp64 library. See make.inc.mkl-gcc or make.inc.mkl-icc.
# see MKL Link Advisor at http://software.intel.com/sites/products/mkl/
# icc with MKL 10.3, Intel threads, 64-bit int
# note -DMAGMA_ILP64 or -DMKL_ILP64, and -fdefault-integer-8 in FFLAGS above
LIB = -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lpthread -lcublas -lcudart -lstdc++ -lm
# define library directories preferably in your environment, or here.
# for MKL run, e.g.: source /opt/intel/composerxe/mkl/bin/mklvars.sh intel64
#MKLROOT ?= /opt/intel/composerxe/mkl
#CUDADIR ?= /usr/local/cuda
-include make.check-mkl
-include make.check-cuda
LIBDIR = -L$(CUDADIR)/lib64 \
-L$(MKLROOT)/lib/intel64
INC = -I$(CUDADIR)/include \
-I$(MKLROOT)/include
Code: Select all
mark.horn@sid ~/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2 $ make
compile for CUDA arch 2.x (Fermi)
compile for CUDA arch 3.0 (Kepler)
compile for CUDA arch 3.5 (Kepler)
======================================== magmablas
( cd magmablas && make )
make[1]: Entering directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/magmablas'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/magmablas'
======================================== src
( cd src && make )
make[1]: Entering directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/src'
======================================== control
( cd control && make )
make[1]: Entering directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/control'
ifort -O3 -fPIC -DADD_ -warn all -warn nounused -fdefault-integer-8 -Dmagma_devptr_t="integer(kind=8)" -I/usr/local/cuda/include -I/opt/intel/composer_xe_2015.0.090/mkl/include -I../include -I../control -I../sparse-iter/include -I../sparse-iter/control -c magma_param.f90 -o magma_param.o
/bin/sh: 1: ifort: not found
make[1]: *** [magma_param.o] Error 127
make[1]: Leaving directory `/home/mark.horn/Development/GPU/MAGMA1.6.2/magma-1.6.2/magma-1.6.2/control'
make: *** [libmagma] Error 2
Code: Select all
gcc -Wall -o example example.o zfill.o -L../lib -L/usr/local/cuda/lib64 -L/opt/intel/mkl//lib/intel64 -lmagma -lcublas -lcudart
example.o: In function `main':
example.c:(.text+0x10): undefined reference to `magma_init'
example.c:(.text+0x37): undefined reference to `magma_finalize'
zfill.o: In function `magma_zmalloc_cpu':
zfill.c:(.text+0x6b): undefined reference to `magma_malloc_cpu'
zfill.o: In function `zfill_matrix_gpu':
zfill.c:(.text+0x203): undefined reference to `magma_zsetmatrix_internal'
zfill.c:(.text+0x20f): undefined reference to `magma_free_cpu'
collect2: error: ld returned 1 exit status
make: *** [example] Error 1