| 1 |
#=============================================================================== |
| 2 |
# SuiteSparse_config.mk: common configuration file for the SuiteSparse |
| 3 |
#=============================================================================== |
| 4 |
|
| 5 |
# This file contains all configuration settings for all packages authored or |
| 6 |
# co-authored by Tim Davis: |
| 7 |
# |
| 8 |
# Package Version Description |
| 9 |
# ------- ------- ----------- |
| 10 |
# AMD 1.2 or later approximate minimum degree ordering |
| 11 |
# COLAMD 2.4 or later column approximate minimum degree ordering |
| 12 |
# CCOLAMD 1.0 or later constrained column approximate minimum degree ordering |
| 13 |
# CAMD any constrained approximate minimum degree ordering |
| 14 |
# UMFPACK 4.5 or later sparse LU factorization, with the BLAS |
| 15 |
# CHOLMOD any sparse Cholesky factorization, update/downdate |
| 16 |
# KLU 0.8 or later sparse LU factorization, BLAS-free |
| 17 |
# BTF 0.8 or later permutation to block triangular form |
| 18 |
# LDL 1.2 or later concise sparse LDL' |
| 19 |
# CXSparse any extended version of CSparse (int/long, real/complex) |
| 20 |
# SuiteSparseQR any sparse QR factorization |
| 21 |
# RBio 2.0 or later read/write sparse matrices in Rutherford-Boeing format |
| 22 |
# |
| 23 |
# By design, this file is NOT included in the CSparse makefile. |
| 24 |
# That package is fully stand-alone. CSparse is primarily for teaching; |
| 25 |
# production code should use CXSparse. |
| 26 |
# |
| 27 |
# The SuiteSparse_config directory and the above packages should all appear in |
| 28 |
# a single directory, in order for the Makefile's within each package to find |
| 29 |
# this file. |
| 30 |
# |
| 31 |
# To enable an option of the form "# OPTION = ...", edit this file and |
| 32 |
# delete the "#" in the first column of the option you wish to use. |
| 33 |
# |
| 34 |
# The use of METIS 4.0.1 is optional. To exclude METIS, you must compile with |
| 35 |
# CHOLMOD_CONFIG set to -DNPARTITION. See below for details. However, if you |
| 36 |
# do not have a metis-4.0 directory inside the SuiteSparse directory, the |
| 37 |
# */Makefile's that optionally rely on METIS will automatically detect this |
| 38 |
# and compile without METIS. |
| 39 |
|
| 40 |
#------------------------------------------------------------------------------ |
| 41 |
# Generic configuration |
| 42 |
#------------------------------------------------------------------------------ |
| 43 |
|
| 44 |
# Using standard definitions from the make environment, typically: |
| 45 |
# |
| 46 |
# CC cc C compiler |
| 47 |
# CXX g++ C++ compiler |
| 48 |
# CFLAGS [ ] flags for C and C++ compiler |
| 49 |
# CPPFLAGS [ ] flags for C and C++ compiler |
| 50 |
# TARGET_ARCH [ ] target architecture |
| 51 |
# FFLAGS [ ] flags for Fortran compiler |
| 52 |
# RM rm -f delete a file |
| 53 |
# AR ar create a static *.a library archive |
| 54 |
# ARFLAGS rv flags for ar |
| 55 |
# MAKE make make itself (sometimes called gmake) |
| 56 |
# |
| 57 |
# You can redefine them here, but by default they are used from the |
| 58 |
# default make environment. |
| 59 |
|
| 60 |
# C and C++ compiler flags. The first three are standard for *.c and *.cpp |
| 61 |
# Add -DNTIMER if you do use any timing routines (otherwise -lrt is required). |
| 62 |
# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER |
| 63 |
CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER |
| 64 |
|
| 65 |
# ranlib, and ar, for generating libraries. If you don't need ranlib, |
| 66 |
# just change it to RANLAB = echo |
| 67 |
AR = @AR@ |
| 68 |
RANLIB = @RANLIB@ |
| 69 |
ARFLAGS =@ARFLAGS@ |
| 70 |
|
| 71 |
ARCHIVE = $(AR) $(ARFLAGS) |
| 72 |
|
| 73 |
# copy and delete a file |
| 74 |
CP = cp -f |
| 75 |
MV = mv -f |
| 76 |
|
| 77 |
# Fortran compiler (not required for 'make' or 'make library') |
| 78 |
F77 = gfortran |
| 79 |
F77FLAGS = $(FFLAGS) -O |
| 80 |
F77LIB = |
| 81 |
|
| 82 |
# C and Fortran libraries. Remove -lrt if you don't have it. |
| 83 |
LIB = -lm |
| 84 |
# Using the following requires CF = ... -DNTIMER on POSIX C systems. |
| 85 |
# LIB = -lm |
| 86 |
|
| 87 |
# For "make install" |
| 88 |
INSTALL_LIB = @abs_srcdir@/3rdparty/lib |
| 89 |
INSTALL_INCLUDE = @abs_srcdir@/3rdparty/include |
| 90 |
|
| 91 |
# Which version of MAKE you are using (default is "make") |
| 92 |
# MAKE = make |
| 93 |
# MAKE = gmake |
| 94 |
|
| 95 |
#------------------------------------------------------------------------------ |
| 96 |
# BLAS and LAPACK configuration: |
| 97 |
#------------------------------------------------------------------------------ |
| 98 |
|
| 99 |
# UMFPACK and CHOLMOD both require the BLAS. CHOLMOD also requires LAPACK. |
| 100 |
# See Kazushige Goto's BLAS at http://www.cs.utexas.edu/users/flame/goto/ or |
| 101 |
# http://www.tacc.utexas.edu/~kgoto/ for the best BLAS to use with CHOLMOD. |
| 102 |
# LAPACK is at http://www.netlib.org/lapack/ . You can use the standard |
| 103 |
# Fortran LAPACK along with Goto's BLAS to obtain very good performance. |
| 104 |
# CHOLMOD gets a peak numeric factorization rate of 3.6 Gflops on a 3.2 GHz |
| 105 |
# Pentium 4 (512K cache, 4GB main memory) with the Goto BLAS, and 6 Gflops |
| 106 |
# on a 2.5Ghz dual-core AMD Opteron. |
| 107 |
|
| 108 |
# These settings will probably not work, since there is no fixed convention for |
| 109 |
# naming the BLAS and LAPACK library (*.a or *.so) files. |
| 110 |
|
| 111 |
# This is probably slow ... it might connect to the Standard Reference BLAS: |
| 112 |
BLAS = @BLASLIBS@ |
| 113 |
LAPACK = @LAPACKLIBS@ |
| 114 |
|
| 115 |
# NOTE: this next option for the "Goto BLAS" has nothing to do with a "goto" |
| 116 |
# statement. Rather, the Goto BLAS is written by Dr. Kazushige Goto. |
| 117 |
# Using the Goto BLAS: |
| 118 |
# BLAS = -lgoto -lgfortran -lgfortranbegin |
| 119 |
# BLAS = -lgoto2 -lgfortran -lgfortranbegin -lpthread |
| 120 |
|
| 121 |
# Using non-optimized versions: |
| 122 |
# BLAS = -lblas_plain -lgfortran -lgfortranbegin |
| 123 |
# LAPACK = -llapack_plain |
| 124 |
|
| 125 |
# BLAS = -lblas_plain -lgfortran -lgfortranbegin |
| 126 |
# LAPACK = -llapack |
| 127 |
|
| 128 |
# The BLAS might not contain xerbla, an error-handling routine for LAPACK and |
| 129 |
# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and |
| 130 |
# stops the application program if an error occurs. A C version of xerbla |
| 131 |
# distributed with this software (SuiteSparse_config/xerbla/libcerbla.a) |
| 132 |
# includes a Fortran-callable xerbla routine that prints nothing and does not |
| 133 |
# stop the application program. This is optional. |
| 134 |
|
| 135 |
# XERBLA = ../../SuiteSparse_config/xerbla/libcerbla.a |
| 136 |
|
| 137 |
# If you wish to use the XERBLA in LAPACK and/or the BLAS instead, |
| 138 |
# use this option: |
| 139 |
XERBLA = |
| 140 |
|
| 141 |
# If you wish to use the Fortran SuiteSparse_config/xerbla/xerbla.f instead, |
| 142 |
# use this: |
| 143 |
|
| 144 |
# XERBLA = ../../SuiteSparse_config/xerbla/libxerbla.a |
| 145 |
|
| 146 |
#------------------------------------------------------------------------------ |
| 147 |
# GPU configuration for CHOLMOD, using the CUDA BLAS |
| 148 |
#------------------------------------------------------------------------------ |
| 149 |
|
| 150 |
# no cuda |
| 151 |
GPU_BLAS_PATH = |
| 152 |
GPU_CONFIG = |
| 153 |
|
| 154 |
# with cuda BLAS acceleration for CHOLMOD |
| 155 |
# GPU_BLAS_PATH=/usr/local/cuda |
| 156 |
# GPU_CONFIG=-DGPU_BLAS -I$(GPU_BLAS_PATH)/include |
| 157 |
|
| 158 |
#------------------------------------------------------------------------------ |
| 159 |
# METIS, optionally used by CHOLMOD |
| 160 |
#------------------------------------------------------------------------------ |
| 161 |
|
| 162 |
# If you do not have METIS, or do not wish to use it in CHOLMOD, you must |
| 163 |
# compile CHOLMOD with the -DNPARTITION flag. |
| 164 |
|
| 165 |
# The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc. |
| 166 |
# You may wish to use an absolute path. METIS is optional. Compile |
| 167 |
# CHOLMOD with -DNPARTITION if you do not wish to use METIS. |
| 168 |
METIS_PATH = ../../metis-4.0 |
| 169 |
METIS = ../../metis-4.0/libmetis.a |
| 170 |
|
| 171 |
#------------------------------------------------------------------------------ |
| 172 |
# UMFPACK configuration: |
| 173 |
#------------------------------------------------------------------------------ |
| 174 |
|
| 175 |
# Configuration flags for UMFPACK. See UMFPACK/Source/umf_config.h for details. |
| 176 |
# |
| 177 |
# -DNBLAS do not use the BLAS. UMFPACK will be very slow. |
| 178 |
# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by |
| 179 |
# LAPACK and the BLAS (defaults to 'int') |
| 180 |
# -DNSUNPERF do not use the Sun Perf. Library (default is use it on Solaris) |
| 181 |
# -DNRECIPROCAL do not multiply by the reciprocal |
| 182 |
# -DNO_DIVIDE_BY_ZERO do not divide by zero |
| 183 |
# -DNCHOLMOD do not use CHOLMOD as a ordering method. If -DNCHOLMOD is |
| 184 |
# included in UMFPACK_CONFIG, then UMFPACK does not rely on |
| 185 |
# CHOLMOD, CAMD, CCOLAMD, COLAMD, and METIS. |
| 186 |
|
| 187 |
UMFPACK_CONFIG = |
| 188 |
|
| 189 |
# uncomment this line to compile UMFPACK without CHOLMOD: |
| 190 |
# UMFPACK_CONFIG = -DNCHOLMOD |
| 191 |
|
| 192 |
#------------------------------------------------------------------------------ |
| 193 |
# CHOLMOD configuration |
| 194 |
#------------------------------------------------------------------------------ |
| 195 |
|
| 196 |
# CHOLMOD Library Modules, which appear in libcholmod.a: |
| 197 |
# Core requires: none |
| 198 |
# Check requires: Core |
| 199 |
# Cholesky requires: Core, AMD, COLAMD. optional: Partition, Supernodal |
| 200 |
# MatrixOps requires: Core |
| 201 |
# Modify requires: Core |
| 202 |
# Partition requires: Core, CCOLAMD, METIS. optional: Cholesky |
| 203 |
# Supernodal requires: Core, BLAS, LAPACK |
| 204 |
# |
| 205 |
# CHOLMOD test/demo Modules (all are GNU GPL, do not appear in libcholmod.a): |
| 206 |
# Tcov requires: Core, Check, Cholesky, MatrixOps, Modify, Supernodal |
| 207 |
# optional: Partition |
| 208 |
# Valgrind same as Tcov |
| 209 |
# Demo requires: Core, Check, Cholesky, MatrixOps, Supernodal |
| 210 |
# optional: Partition |
| 211 |
# |
| 212 |
# Configuration flags: |
| 213 |
# -DNCHECK do not include the Check module. License GNU LGPL |
| 214 |
# -DNCHOLESKY do not include the Cholesky module. License GNU LGPL |
| 215 |
# -DNPARTITION do not include the Partition module. License GNU LGPL |
| 216 |
# also do not include METIS. |
| 217 |
# -DNGPL do not include any GNU GPL Modules in the CHOLMOD library: |
| 218 |
# -DNMATRIXOPS do not include the MatrixOps module. License GNU GPL |
| 219 |
# -DNMODIFY do not include the Modify module. License GNU GPL |
| 220 |
# -DNSUPERNODAL do not include the Supernodal module. License GNU GPL |
| 221 |
# |
| 222 |
# -DNPRINT do not print anything. |
| 223 |
# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by |
| 224 |
# LAPACK and the BLAS (defaults to 'int') |
| 225 |
# -DNSUNPERF for Solaris only. If defined, do not use the Sun |
| 226 |
# Performance Library |
| 227 |
|
| 228 |
CHOLMOD_CONFIG = -DNPARTITION -DNGPL $(GPU_CONFIG) |
| 229 |
|
| 230 |
# uncomment this line to compile CHOLMOD without METIS: |
| 231 |
# CHOLMOD_CONFIG = -DNPARTITION |
| 232 |
|
| 233 |
#------------------------------------------------------------------------------ |
| 234 |
# SuiteSparseQR configuration: |
| 235 |
#------------------------------------------------------------------------------ |
| 236 |
|
| 237 |
# The SuiteSparseQR library can be compiled with the following options: |
| 238 |
# |
| 239 |
# -DNPARTITION do not include the CHOLMOD partition module |
| 240 |
# -DNEXPERT do not include the functions in SuiteSparseQR_expert.cpp |
| 241 |
# -DHAVE_TBB enable the use of Intel's Threading Building Blocks (TBB) |
| 242 |
|
| 243 |
# default, without timing, without TBB: |
| 244 |
SPQR_CONFIG = |
| 245 |
# with TBB: |
| 246 |
# SPQR_CONFIG = -DHAVE_TBB |
| 247 |
|
| 248 |
# This is needed for IBM AIX: (but not for and C codes, just C++) |
| 249 |
# SPQR_CONFIG = -DBLAS_NO_UNDERSCORE |
| 250 |
|
| 251 |
# with TBB, you must select this: |
| 252 |
# TBB = -ltbb |
| 253 |
# without TBB: |
| 254 |
TBB = |
| 255 |
|
| 256 |
#------------------------------------------------------------------------------ |
| 257 |
# Linux |
| 258 |
#------------------------------------------------------------------------------ |
| 259 |
|
| 260 |
# Using default compilers: |
| 261 |
CC = @CC@ |
| 262 |
CFLAGS = @CFLAGS@ |
| 263 |
# CF = $(CFLAGS) -O3 -fexceptions |
| 264 |
|
| 265 |
# alternatives: |
| 266 |
# CF = $(CFLAGS) -g -fexceptions \ |
| 267 |
-Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \ |
| 268 |
-Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi \ |
| 269 |
-funit-at-a-time |
| 270 |
# CF = $(CFLAGS) -O3 -fexceptions \ |
| 271 |
-Wall -W -Werror -Wshadow -Wmissing-prototypes -Wstrict-prototypes \ |
| 272 |
-Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi |
| 273 |
# CF = $(CFLAGS) -O3 -fexceptions -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE |
| 274 |
# CF = $(CFLAGS) -O3 |
| 275 |
# CF = $(CFLAGS) -O3 -g -fexceptions |
| 276 |
# CF = $(CFLAGS) -g -fexceptions \ |
| 277 |
-Wall -W -Wshadow \ |
| 278 |
-Wredundant-decls -Wdisabled-optimization -ansi |
| 279 |
|
| 280 |
# consider: |
| 281 |
# -fforce-addr -fmove-all-movables -freduce-all-givs -ftsp-ordering |
| 282 |
# -frename-registers -ffast-math -funroll-loops |
| 283 |
|
| 284 |
# Using the Goto BLAS: |
| 285 |
# BLAS = -lgoto -lfrtbegin -lg2c $(XERBLA) -lpthread |
| 286 |
|
| 287 |
# Using Intel's icc and ifort compilers: |
| 288 |
# (does not work for mexFunctions unless you add a mexopts.sh file) |
| 289 |
# F77 = ifort |
| 290 |
# CC = icc |
| 291 |
# CF = $(CFLAGS) -O3 -xN -vec_report=0 |
| 292 |
# CF = $(CFLAGS) -g |
| 293 |
|
| 294 |
# 64bit: |
| 295 |
# F77FLAGS = -O -m64 |
| 296 |
# CF = $(CFLAGS) -O3 -fexceptions -m64 |
| 297 |
# BLAS = -lgoto64 -lfrtbegin -lg2c -lpthread $(XERBLA) |
| 298 |
# LAPACK = -llapack64 |
| 299 |
|
| 300 |
# SUSE Linux 10.1, AMD Opteron, with GOTO Blas |
| 301 |
# F77 = gfortran |
| 302 |
# BLAS = -lgoto_opteron64 -lgfortran |
| 303 |
|
| 304 |
# SUSE Linux 10.1, Intel Pentium, with GOTO Blas |
| 305 |
# F77 = gfortran |
| 306 |
# BLAS = -lgoto -lgfortran |
| 307 |
|
| 308 |
#------------------------------------------------------------------------------ |
| 309 |
# Mac |
| 310 |
#------------------------------------------------------------------------------ |
| 311 |
|
| 312 |
# As recommended by macports, http://suitesparse.darwinports.com/ |
| 313 |
# I've tested them myself on Mac OSX 10.6.1 and 10.6.8 (Snow Leopard), |
| 314 |
# on my MacBook Air, and they work fine. |
| 315 |
|
| 316 |
# F77 = gfortran |
| 317 |
# CF = $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER |
| 318 |
# BLAS = -framework Accelerate |
| 319 |
# LAPACK = -framework Accelerate |
| 320 |
# LIB = -lm |
| 321 |
|
| 322 |
#------------------------------------------------------------------------------ |
| 323 |
# Solaris |
| 324 |
#------------------------------------------------------------------------------ |
| 325 |
|
| 326 |
# 32-bit |
| 327 |
# CF = $(CFLAGS) -KPIC -dalign -xc99=%none -Xc -xlibmieee -xO5 -xlibmil -m32 |
| 328 |
|
| 329 |
# 64-bit |
| 330 |
# CF = $(CFLAGS) -fast -KPIC -xc99=%none -xlibmieee -xlibmil -m64 -Xc |
| 331 |
|
| 332 |
# FFLAGS = -fast -KPIC -dalign -xlibmil -m64 |
| 333 |
|
| 334 |
# The Sun Performance Library includes both LAPACK and the BLAS: |
| 335 |
# BLAS = -xlic_lib=sunperf |
| 336 |
# LAPACK = |
| 337 |
|
| 338 |
|
| 339 |
#------------------------------------------------------------------------------ |
| 340 |
# Compaq Alpha |
| 341 |
#------------------------------------------------------------------------------ |
| 342 |
|
| 343 |
# 64-bit mode only |
| 344 |
# CF = $(CFLAGS) -O2 -std1 |
| 345 |
# BLAS = -ldxml |
| 346 |
# LAPACK = |
| 347 |
|
| 348 |
#------------------------------------------------------------------------------ |
| 349 |
# IBM RS 6000 |
| 350 |
#------------------------------------------------------------------------------ |
| 351 |
|
| 352 |
# BLAS = -lessl |
| 353 |
# LAPACK = |
| 354 |
|
| 355 |
# 32-bit mode: |
| 356 |
# CF = $(CFLAGS) -O4 -qipa -qmaxmem=16384 -qproto |
| 357 |
# F77FLAGS = -O4 -qipa -qmaxmem=16384 |
| 358 |
|
| 359 |
# 64-bit mode: |
| 360 |
# CF = $(CFLAGS) -O4 -qipa -qmaxmem=16384 -q64 -qproto |
| 361 |
# F77FLAGS = -O4 -qipa -qmaxmem=16384 -q64 |
| 362 |
|
| 363 |
#------------------------------------------------------------------------------ |
| 364 |
# SGI IRIX |
| 365 |
#------------------------------------------------------------------------------ |
| 366 |
|
| 367 |
# BLAS = -lscsl |
| 368 |
# LAPACK = |
| 369 |
|
| 370 |
# 32-bit mode |
| 371 |
# CF = $(CFLAGS) -O |
| 372 |
|
| 373 |
# 64-bit mode (32 bit int's and 64-bit long's): |
| 374 |
# CF = $(CFLAGS) -64 |
| 375 |
# F77FLAGS = -64 |
| 376 |
|
| 377 |
# SGI doesn't have ranlib |
| 378 |
# RANLIB = echo |
| 379 |
|
| 380 |
#------------------------------------------------------------------------------ |
| 381 |
# AMD Opteron (64 bit) |
| 382 |
#------------------------------------------------------------------------------ |
| 383 |
|
| 384 |
# BLAS = -lgoto_opteron64 -lg2c |
| 385 |
# LAPACK = -llapack_opteron64 |
| 386 |
|
| 387 |
# SUSE Linux 10.1, AMD Opteron |
| 388 |
# F77 = gfortran |
| 389 |
# BLAS = -lgoto_opteron64 -lgfortran |
| 390 |
# LAPACK = -llapack_opteron64 |
| 391 |
|
| 392 |
#------------------------------------------------------------------------------ |
| 393 |
# remove object files and profile output |
| 394 |
#------------------------------------------------------------------------------ |
| 395 |
|
| 396 |
CLEAN = *.o *.obj *.ln *.bb *.bbg *.da *.tcov *.gcov gmon.out *.bak *.d *.gcda *.gcno |