[IPOL discuss] [LATE] Re: Clapack and cblas libraries interfacing

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Fri Oct 31 09:12:48 CET 2014


> A makefile fragment is attached to this message, showing how to
> choose at compilation time which library you link with (used and
> tests with sgemm on Linux only, with Netlib, ATLAS, OpenBLAS, GSL
> and MKL).

Missing attachment makefile.blas.

-- 
Nicolas LIMARE
-------------- next part --------------
# -*- makefile -*-
# Copyright 2014 Nicolas Limare <nicolas.limare at cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

# Intel MKL
# link with libmkl_core.so and others
ifeq ($(WITH_BLAS), mkl)
BLAS		= mkl
ifndef MKLROOT
$(error "MKLROOT must be defined to use the MKL libraries.")
endif
LDFLAGS		+= -L$(MKLROOT)/lib/intel64 \
                   -lmkl_gf_lp64 -lmkl_core -lpthread \
		   -lmkl_gnu_thread
endif

# OpenBLAS
# link with libopenblas.so
ifeq ($(WITH_BLAS), open)
BLAS		= open
LDFLAGS		+= -lopenblas
endif

# Atlas
# link with libcblas.so libatlas.so
ifeq ($(WITH_BLAS), atlas)
BLAS		= atlas
LDFLAGS		+= -lcblas -latlas
endif

# GSL
# link with libgslcblas.so
ifeq ($(WITH_BLAS), gsl)
BLAS		= gsl
LDFLAGS		+= -lgslcblas
endif

# Fallback to generic BLAS
# link with libblas.so
ifndef BLAS
BLAS		= generic
LDFLAGS		+= -lblas
endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://tools.ipol.im/mailman/archive/discuss/attachments/20141031/888b41a8/attachment.pgp>


More information about the discuss mailing list