git.iko.soy/typeable/nixpkgs
on master help sign in
suitesparse: add version 4.4.1
commitd582090a15912b5838720a8e0a51accacf043c03 authorThomas Tuegel <ttuegel@gmail.com> dateMon 15 Dec 2014, 11:29 (12 years ago) parent81c0f94
8 files changed+605−3
pkgs/development/libraries/science/math/suitesparse/0001-disable-metis.patch+36 pkgs/development/libraries/science/math/suitesparse/0002-set-install-dir.patch+27 pkgs/development/libraries/science/math/suitesparse/0003-blas-lapack-flags.patch+27 pkgs/development/libraries/suitesparse/default.nix → pkgs/development/libraries/science/math/suitesparse/4.2.nix pkgs/development/libraries/science/math/suitesparse/SuiteSparse_config.mk+452 pkgs/development/libraries/science/math/suitesparse/default.nix+58 pkgs/development/libraries/suitesparse/disable-metis.patch → pkgs/development/libraries/science/math/suitesparse/disable-metis.patch pkgs/top-level/all-packages.nix+5−3
pkgs/development/libraries/science/math/suitesparse/0001-disable-metis.patchnew file+36
@@ -0,0 +1,36 @@
1+From 456b26d0c9101adaa5876954baac0ca0e872dab6 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Mon, 15 Dec 2014 10:18:01 -0600
4+Subject: [PATCH 1/3] disable metis
5+
6+---
7+ SuiteSparse_config/SuiteSparse_config.mk | 6 +++---
8+ 1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+diff --git a/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse_config/SuiteSparse_config.mk
11+index ba2da23..e1514bf 100644
12+--- a/SuiteSparse_config/SuiteSparse_config.mk
13++++ b/SuiteSparse_config/SuiteSparse_config.mk
14+@@ -212,8 +212,8 @@ XERBLA =
15+ # The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
16+ # You may wish to use an absolute path. METIS is optional. Compile
17+ # CHOLMOD with -DNPARTITION if you do not wish to use METIS.
18+-METIS_PATH = ../../metis-4.0
19+-METIS = ../../metis-4.0/libmetis.a
20++# METIS_PATH = ../../metis-4.0
21++# METIS = ../../metis-4.0/libmetis.a
22+
23+ #------------------------------------------------------------------------------
24+ # UMFPACK configuration:
25+@@ -273,7 +273,7 @@ UMFPACK_CONFIG =
26+ # -DNSUNPERF for Solaris only. If defined, do not use the Sun
27+ # Performance Library
28+
29+-CHOLMOD_CONFIG = $(GPU_CONFIG)
30++CHOLMOD_CONFIG = $(GPU_CONFIG) -DNPARTITION
31+
32+ # uncomment this line to compile CHOLMOD without METIS:
33+ # CHOLMOD_CONFIG = -DNPARTITION
34+--
35+2.1.3
36+
pkgs/development/libraries/science/math/suitesparse/0002-set-install-dir.patchnew file+27
@@ -0,0 +1,27 @@
1+From e0fee492a315ce1ef8697b056af210beb1465334 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Mon, 15 Dec 2014 10:18:12 -0600
4+Subject: [PATCH 2/3] set install dir
5+
6+---
7+ SuiteSparse_config/SuiteSparse_config.mk | 4 ++--
8+ 1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+diff --git a/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse_config/SuiteSparse_config.mk
11+index e1514bf..f1046a6 100644
12+--- a/SuiteSparse_config/SuiteSparse_config.mk
13++++ b/SuiteSparse_config/SuiteSparse_config.mk
14+@@ -95,8 +95,8 @@ F77LIB =
15+ # LIB = -lm
16+
17+ # For "make install"
18+-INSTALL_LIB = /usr/local/lib
19+-INSTALL_INCLUDE = /usr/local/include
20++INSTALL_LIB = @out@/lib
21++INSTALL_INCLUDE = @out@/include
22+
23+ # Which version of MAKE you are using (default is "make")
24+ # MAKE = make
25+--
26+2.1.3
27+
pkgs/development/libraries/science/math/suitesparse/0003-blas-lapack-flags.patchnew file+27
@@ -0,0 +1,27 @@
1+From a99cca30cfd965683564ae024e8ecc615c61697a Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Mon, 15 Dec 2014 10:24:08 -0600
4+Subject: [PATCH 3/3] blas lapack flags
5+
6+---
7+ SuiteSparse_config/SuiteSparse_config.mk | 4 ++--
8+ 1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+diff --git a/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse_config/SuiteSparse_config.mk
11+index f1046a6..1710162 100644
12+--- a/SuiteSparse_config/SuiteSparse_config.mk
13++++ b/SuiteSparse_config/SuiteSparse_config.mk
14+@@ -119,8 +119,8 @@ INSTALL_INCLUDE = @out@/include
15+ # naming the BLAS and LAPACK library (*.a or *.so) files.
16+
17+ # This is probably slow ... it might connect to the Standard Reference BLAS:
18+- BLAS = -lblas -lgfortran
19+- LAPACK = -llapack
20++ BLAS = @blasFlags@
21++ LAPACK = @lapackFlags@
22+
23+ # MKL
24+ # BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm
25+--
26+2.1.3
27+
pkgs/development/libraries/suitesparse/default.nix → pkgs/development/libraries/science/math/suitesparse/4.2.nixrenamed

The content is the same.

pkgs/development/libraries/science/math/suitesparse/SuiteSparse_config.mknew file+452
@@ -0,0 +1,452 @@
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+# To use OpenMP add -openmp to the CFLAGS
61+# If OpenMP is used, it is recommended to define CHOLMOD_OMP_NUM_THREADS
62+# as the number of cores per socket on the machine being used to maximize
63+# memory performance
64+ CFLAGS =
65+# CFLAGS = -g
66+# for the icc compiler and OpenMP:
67+# CFLAGS = -openmp
68+
69+# C and C++ compiler flags. The first three are standard for *.c and *.cpp
70+# Add -DNTIMER if you do use any timing routines (otherwise -lrt is required).
71+# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER
72+ CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC
73+# for the MKL BLAS:
74+# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -I$(MKLROOT)/include -D_GNU_SOURCE
75+# with no optimization:
76+# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -fexceptions -fPIC
77+
78+# ranlib, and ar, for generating libraries. If you don't need ranlib,
79+# just change it to RANLAB = echo
80+RANLIB = ranlib
81+ARCHIVE = $(AR) $(ARFLAGS)
82+
83+# copy and delete a file
84+CP = cp -f
85+MV = mv -f
86+
87+# Fortran compiler (not required for 'make' or 'make library')
88+F77 = gfortran
89+F77FLAGS = $(FFLAGS) -O
90+F77LIB =
91+
92+# C and Fortran libraries. Remove -lrt if you don't have it.
93+ LIB = -lm -lrt
94+# Using the following requires CF = ... -DNTIMER on POSIX C systems.
95+# LIB = -lm
96+
97+# For "make install"
98+INSTALL_LIB = @out@/lib
99+INSTALL_INCLUDE = @out@/include
100+
101+# Which version of MAKE you are using (default is "make")
102+# MAKE = make
103+# MAKE = gmake
104+
105+#------------------------------------------------------------------------------
106+# BLAS and LAPACK configuration:
107+#------------------------------------------------------------------------------
108+
109+# UMFPACK and CHOLMOD both require the BLAS. CHOLMOD also requires LAPACK.
110+# See Kazushige Goto's BLAS at http://www.cs.utexas.edu/users/flame/goto/ or
111+# http://www.tacc.utexas.edu/~kgoto/ for the best BLAS to use with CHOLMOD.
112+# LAPACK is at http://www.netlib.org/lapack/ . You can use the standard
113+# Fortran LAPACK along with Goto's BLAS to obtain very good performance.
114+# CHOLMOD gets a peak numeric factorization rate of 3.6 Gflops on a 3.2 GHz
115+# Pentium 4 (512K cache, 4GB main memory) with the Goto BLAS, and 6 Gflops
116+# on a 2.5Ghz dual-core AMD Opteron.
117+
118+# These settings will probably not work, since there is no fixed convention for
119+# naming the BLAS and LAPACK library (*.a or *.so) files.
120+
121+# This is probably slow ... it might connect to the Standard Reference BLAS:
122+ BLAS = -lf77blas -latlas -lcblas -lgfortran
123+ LAPACK = -llapack -latlas -lcblas
124+
125+# MKL
126+# BLAS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm
127+# LAPACK =
128+
129+# ACML
130+# BLAS = -lacml -lgfortran
131+# LAPACK =
132+
133+# OpenBLAS
134+# BLAS = -lopenblas
135+# LAPACK =
136+
137+# NOTE: this next option for the "Goto BLAS" has nothing to do with a "goto"
138+# statement. Rather, the Goto BLAS is written by Dr. Kazushige Goto.
139+# Using the Goto BLAS:
140+# BLAS = -lgoto -lgfortran -lgfortranbegin
141+# BLAS = -lgoto2 -lgfortran -lgfortranbegin -lpthread
142+
143+# Using non-optimized versions:
144+# BLAS = -lblas_plain -lgfortran -lgfortranbegin
145+# LAPACK = -llapack_plain
146+
147+# BLAS = -lblas_plain -lgfortran -lgfortranbegin
148+# LAPACK = -llapack
149+
150+# The BLAS might not contain xerbla, an error-handling routine for LAPACK and
151+# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and
152+# stops the application program if an error occurs. A C version of xerbla
153+# distributed with this software (SuiteSparse_config/xerbla/libcerbla.a)
154+# includes a Fortran-callable xerbla routine that prints nothing and does not
155+# stop the application program. This is optional.
156+
157+# XERBLA = ../../SuiteSparse_config/xerbla/libcerbla.a
158+
159+# If you wish to use the XERBLA in LAPACK and/or the BLAS instead,
160+# use this option:
161+XERBLA =
162+
163+# If you wish to use the Fortran SuiteSparse_config/xerbla/xerbla.f instead,
164+# use this:
165+
166+# XERBLA = ../../SuiteSparse_config/xerbla/libxerbla.a
167+
168+#------------------------------------------------------------------------------
169+# GPU configuration for CHOLMOD and SPQR
170+#------------------------------------------------------------------------------
171+
172+# no cuda
173+ CUDA_ROOT =
174+ GPU_BLAS_PATH =
175+ GPU_CONFIG =
176+ CUDA_PATH =
177+ CUDART_LIB =
178+ CUBLAS_LIB =
179+ CUDA_INC_PATH =
180+ NV20 =
181+ NV30 =
182+ NV35 =
183+ NVCC = echo
184+ NVCCFLAGS =
185+
186+# with cuda for CHOLMOD
187+# CUDA_ROOT = /usr/local/cuda
188+# GPU_BLAS_PATH = $(CUDA_ROOT)
189+# with 4 cores (default):
190+# GPU_CONFIG = -I$(CUDA_ROOT)/include -DGPU_BLAS
191+# with 10 cores:
192+# GPU_CONFIG = -I$(CUDA_ROOT)/include -DGPU_BLAS -DCHOLMOD_OMP_NUM_THREADS=10
193+# CUDA_PATH = $(CUDA_ROOT)
194+# CUDART_LIB = $(CUDA_ROOT)/lib64/libcudart.so
195+# CUBLAS_LIB = $(CUDA_ROOT)/lib64/libcublas.so
196+# CUDA_INC_PATH = $(CUDA_ROOT)/include/
197+# NV20 = -arch=sm_20 -Xcompiler -fPIC
198+# NV30 = -arch=sm_30 -Xcompiler -fPIC
199+# NV35 = -arch=sm_35 -Xcompiler -fPIC
200+# NVCC = $(CUDA_ROOT)/bin/nvcc
201+# NVCCFLAGS = $(NV20) -O3 -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35
202+
203+# was NVCC = $(CUDA_ROOT)/bin/nvcc $(NV35) $(NV30) $(NV20)
204+
205+#------------------------------------------------------------------------------
206+# METIS, optionally used by CHOLMOD
207+#------------------------------------------------------------------------------
208+
209+# If you do not have METIS, or do not wish to use it in CHOLMOD, you must
210+# compile CHOLMOD with the -DNPARTITION flag.
211+
212+# The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
213+# You may wish to use an absolute path. METIS is optional. Compile
214+# CHOLMOD with -DNPARTITION if you do not wish to use METIS.
215+# METIS_PATH = ../../metis-4.0
216+# METIS = ../../metis-4.0/libmetis.a
217+
218+#------------------------------------------------------------------------------
219+# UMFPACK configuration:
220+#------------------------------------------------------------------------------
221+
222+# Configuration flags for UMFPACK. See UMFPACK/Source/umf_config.h for details.
223+#
224+# -DNBLAS do not use the BLAS. UMFPACK will be very slow.
225+# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by
226+# LAPACK and the BLAS (defaults to 'int')
227+# -DNSUNPERF do not use the Sun Perf. Library (default is use it on Solaris)
228+# -DNRECIPROCAL do not multiply by the reciprocal
229+# -DNO_DIVIDE_BY_ZERO do not divide by zero
230+# -DNCHOLMOD do not use CHOLMOD as a ordering method. If -DNCHOLMOD is
231+# included in UMFPACK_CONFIG, then UMFPACK does not rely on
232+# CHOLMOD, CAMD, CCOLAMD, COLAMD, and METIS.
233+
234+UMFPACK_CONFIG =
235+
236+# uncomment this line to compile UMFPACK without CHOLMOD:
237+# UMFPACK_CONFIG = -DNCHOLMOD
238+
239+#------------------------------------------------------------------------------
240+# CHOLMOD configuration
241+#------------------------------------------------------------------------------
242+
243+# CHOLMOD Library Modules, which appear in libcholmod.a:
244+# Core requires: none
245+# Check requires: Core
246+# Cholesky requires: Core, AMD, COLAMD. optional: Partition, Supernodal
247+# MatrixOps requires: Core
248+# Modify requires: Core
249+# Partition requires: Core, CCOLAMD, METIS. optional: Cholesky
250+# Supernodal requires: Core, BLAS, LAPACK
251+#
252+# CHOLMOD test/demo Modules (all are GNU GPL, do not appear in libcholmod.a):
253+# Tcov requires: Core, Check, Cholesky, MatrixOps, Modify, Supernodal
254+# optional: Partition
255+# Valgrind same as Tcov
256+# Demo requires: Core, Check, Cholesky, MatrixOps, Supernodal
257+# optional: Partition
258+#
259+# Configuration flags:
260+# -DNCHECK do not include the Check module. License GNU LGPL
261+# -DNCHOLESKY do not include the Cholesky module. License GNU LGPL
262+# -DNPARTITION do not include the Partition module. License GNU LGPL
263+# also do not include METIS.
264+# -DNCAMD do not use CAMD, etc from Partition module. GNU LGPL
265+# -DNGPL do not include any GNU GPL Modules in the CHOLMOD library:
266+# -DNMATRIXOPS do not include the MatrixOps module. License GNU GPL
267+# -DNMODIFY do not include the Modify module. License GNU GPL
268+# -DNSUPERNODAL do not include the Supernodal module. License GNU GPL
269+#
270+# -DNPRINT do not print anything.
271+# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by
272+# LAPACK and the BLAS (defaults to 'int')
273+# -DNSUNPERF for Solaris only. If defined, do not use the Sun
274+# Performance Library
275+
276+CHOLMOD_CONFIG = $(GPU_CONFIG) -DNPARTITION
277+
278+# uncomment this line to compile CHOLMOD without METIS:
279+# CHOLMOD_CONFIG = -DNPARTITION
280+
281+#------------------------------------------------------------------------------
282+# SuiteSparseQR configuration:
283+#------------------------------------------------------------------------------
284+
285+# The SuiteSparseQR library can be compiled with the following options:
286+#
287+# -DNPARTITION do not include the CHOLMOD partition module
288+# -DNEXPERT do not include the functions in SuiteSparseQR_expert.cpp
289+# -DHAVE_TBB enable the use of Intel's Threading Building Blocks (TBB)
290+
291+# default, without timing, without TBB:
292+SPQR_CONFIG = $(GPU_CONFIG)
293+# with TBB:
294+# SPQR_CONFIG = -DHAVE_TBB
295+
296+# This is needed for IBM AIX: (but not for and C codes, just C++)
297+# SPQR_CONFIG = -DBLAS_NO_UNDERSCORE
298+
299+# with TBB, you must select this:
300+# TBB = -ltbb
301+# without TBB:
302+TBB =
303+
304+#------------------------------------------------------------------------------
305+# code formatting
306+#------------------------------------------------------------------------------
307+
308+# Use "grep" only, if you do not have "indent"
309+# PRETTY = grep -v "^\#"
310+# PRETTY = grep -v "^\#" | indent -bl -nce -ss -bli0 -i4 -sob -l120
311+ PRETTY = grep -v "^\#" | indent -bl -nce -bli0 -i4 -sob -l120
312+
313+#------------------------------------------------------------------------------
314+# Linux
315+#------------------------------------------------------------------------------
316+
317+# Using default compilers:
318+# CC = gcc
319+# CF = $(CFLAGS) -O3 -fexceptions
320+
321+# alternatives:
322+# CF = $(CFLAGS) -g -fexceptions \
323+# -Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \
324+# -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi \
325+# -funit-at-a-time
326+# CF = $(CFLAGS) -O3 -fexceptions \
327+# -Wall -W -Werror -Wshadow -Wmissing-prototypes -Wstrict-prototypes \
328+# -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi
329+# CF = $(CFLAGS) -O3 -fexceptions -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
330+# CF = $(CFLAGS) -O3
331+# CF = $(CFLAGS) -O3 -g -fexceptions
332+# CF = $(CFLAGS) -g -fexceptions \
333+# -Wall -W -Wshadow \
334+# -Wredundant-decls -Wdisabled-optimization -ansi
335+
336+# consider:
337+# -fforce-addr -fmove-all-movables -freduce-all-givs -ftsp-ordering
338+# -frename-registers -ffast-math -funroll-loops
339+
340+# Using the Goto BLAS:
341+# BLAS = -lgoto -lfrtbegin -lg2c $(XERBLA) -lpthread
342+
343+# Using Intel's icc and ifort compilers:
344+# (does not work for mexFunctions unless you add a mexopts.sh file)
345+# F77 = ifort
346+# CC = icc
347+# CF = $(CFLAGS) -O3 -xN -vec_report=0
348+# CF = $(CFLAGS) -g
349+
350+# 64bit:
351+# F77FLAGS = -O -m64
352+# CF = $(CFLAGS) -O3 -fexceptions -m64
353+# BLAS = -lgoto64 -lfrtbegin -lg2c -lpthread $(XERBLA)
354+# LAPACK = -llapack64
355+
356+# SUSE Linux 10.1, AMD Opteron, with GOTO Blas
357+# F77 = gfortran
358+# BLAS = -lgoto_opteron64 -lgfortran
359+
360+# SUSE Linux 10.1, Intel Pentium, with GOTO Blas
361+# F77 = gfortran
362+# BLAS = -lgoto -lgfortran
363+
364+#------------------------------------------------------------------------------
365+# Mac
366+#------------------------------------------------------------------------------
367+
368+# As recommended by macports, http://suitesparse.darwinports.com/
369+# I've tested them myself on Mac OSX 10.6.1 and 10.6.8 (Snow Leopard),
370+# on my MacBook Air, and they work fine.
371+
372+# F77 = gfortran
373+# CF = $(CFLAGS) -O3 -fno-common -fexceptions -DNTIMER
374+# BLAS = -framework Accelerate
375+# LAPACK = -framework Accelerate
376+# LIB = -lm
377+
378+#------------------------------------------------------------------------------
379+# Solaris
380+#------------------------------------------------------------------------------
381+
382+# 32-bit
383+# CF = $(CFLAGS) -KPIC -dalign -xc99=%none -Xc -xlibmieee -xO5 -xlibmil -m32
384+
385+# 64-bit
386+# CF = $(CFLAGS) -fast -KPIC -xc99=%none -xlibmieee -xlibmil -m64 -Xc
387+
388+# FFLAGS = -fast -KPIC -dalign -xlibmil -m64
389+
390+# The Sun Performance Library includes both LAPACK and the BLAS:
391+# BLAS = -xlic_lib=sunperf
392+# LAPACK =
393+
394+
395+#------------------------------------------------------------------------------
396+# Compaq Alpha
397+#------------------------------------------------------------------------------
398+
399+# 64-bit mode only
400+# CF = $(CFLAGS) -O2 -std1
401+# BLAS = -ldxml
402+# LAPACK =
403+
404+#------------------------------------------------------------------------------
405+# IBM RS 6000
406+#------------------------------------------------------------------------------
407+
408+# BLAS = -lessl
409+# LAPACK =
410+
411+# 32-bit mode:
412+# CF = $(CFLAGS) -O4 -qipa -qmaxmem=16384 -qproto
413+# F77FLAGS = -O4 -qipa -qmaxmem=16384
414+
415+# 64-bit mode:
416+# CF = $(CFLAGS) -O4 -qipa -qmaxmem=16384 -q64 -qproto
417+# F77FLAGS = -O4 -qipa -qmaxmem=16384 -q64
418+
419+#------------------------------------------------------------------------------
420+# SGI IRIX
421+#------------------------------------------------------------------------------
422+
423+# BLAS = -lscsl
424+# LAPACK =
425+
426+# 32-bit mode
427+# CF = $(CFLAGS) -O
428+
429+# 64-bit mode (32 bit int's and 64-bit long's):
430+# CF = $(CFLAGS) -64
431+# F77FLAGS = -64
432+
433+# SGI doesn't have ranlib
434+# RANLIB = echo
435+
436+#------------------------------------------------------------------------------
437+# AMD Opteron (64 bit)
438+#------------------------------------------------------------------------------
439+
440+# BLAS = -lgoto_opteron64 -lg2c
441+# LAPACK = -llapack_opteron64
442+
443+# SUSE Linux 10.1, AMD Opteron
444+# F77 = gfortran
445+# BLAS = -lgoto_opteron64 -lgfortran
446+# LAPACK = -llapack_opteron64
447+
448+#------------------------------------------------------------------------------
449+# remove object files and profile output
450+#------------------------------------------------------------------------------
451+
452+CLEAN = *.o *.obj *.ln *.bb *.bbg *.da *.tcov *.gcov gmon.out *.bak *.d *.gcda *.gcno
pkgs/development/libraries/science/math/suitesparse/default.nixnew file+58
@@ -0,0 +1,58 @@
1+{ stdenv, fetchurl, substituteAll
2+, atlasWithLapack, gfortran }:
3+
4+let
5+ name = "suitesparse-4.4.1";
6+in
7+stdenv.mkDerivation {
8+ inherit name;
9+
10+ src = fetchurl {
11+ url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.1.tar.gz";
12+ sha256 = "0y8i6dizrr556xggpjyc7wijjv4jbizhssmjj4jv8n1s7zxy2z0n";
13+ };
14+
15+ patches = [
16+ ./0001-disable-metis.patch
17+ ./0002-set-install-dir.patch
18+ (substituteAll {
19+ src = ./0003-blas-lapack-flags.patch;
20+ blasFlags = "-lf77blas -latlas -lcblas -lgfortran";
21+ lapackFlags= "-llapack -latlas -lcblas";
22+ })
23+ ];
24+
25+ preConfigure = ''
26+ substituteAllInPlace SuiteSparse_config/SuiteSparse_config.mk
27+ mkdir -p $out/lib
28+ mkdir -p $out/include
29+ '';
30+
31+ postInstall = ''
32+ # Install documentation
33+ outdoc=$out/share/doc/${name}
34+ mkdir -p $outdoc
35+ cp -r AMD/Doc $outdoc/amd
36+ cp -r BTF/Doc $outdoc/bft
37+ cp -r CAMD/Doc $outdoc/camd
38+ cp -r CCOLAMD/Doc $outdoc/ccolamd
39+ cp -r CHOLMOD/Doc $outdoc/cholmod
40+ cp -r COLAMD/Doc $outdoc/colamd
41+ cp -r CXSparse/Doc $outdoc/cxsparse
42+ cp -r KLU/Doc $outdoc/klu
43+ cp -r LDL/Doc $outdoc/ldl
44+ cp -r RBio/Doc $outdoc/rbio
45+ cp -r SPQR/Doc $outdoc/spqr
46+ cp -r UMFPACK/Doc $outdoc/umfpack
47+ '';
48+
49+ nativeBuildInputs = [ gfortran ];
50+ buildInputs = [ atlasWithLapack ];
51+
52+ meta = with stdenv.lib; {
53+ homepage = http://faculty.cse.tamu.edu/davis/suitesparse.html;
54+ description = "A suite of sparse matrix algorithms";
55+ license = with licenses; [ bsd2 gpl2Plus lgpl21Plus ];
56+ maintainers = with maintainers; [ ttuegel ];
57+ };
58+}
pkgs/development/libraries/suitesparse/disable-metis.patch → pkgs/development/libraries/science/math/suitesparse/disable-metis.patchrenamed

The content is the same.

pkgs/top-level/all-packages.nix+5−3
@@ -3499,13 +3499,14 @@ let
34993499 liblapack = liblapack.override {shared = true;};
35003500 llvm = llvm_33;
35013501 openblas = openblas_0_2_2;
3502+ suitesparse = suitesparse_4_2;
35023503 };
35033504
35043505 julia033 = let
35053506 liblapack = liblapack_3_5_0.override {shared = true;};
35063507 in callPackage ../development/compilers/julia/0.3.3.nix {
35073508 inherit liblapack;
3508− suitesparse = suitesparse.override {
3509+ suitesparse = suitesparse_4_2.override {
35093510 inherit liblapack;
35103511 };
35113512 llvm = llvm_33;
@@ -6981,8 +6982,6 @@ let
69816982
69826983 suil = callPackage ../development/libraries/audio/suil { };
69836984
6984− suitesparse = callPackage ../development/libraries/suitesparse { };
6985−
69866985 sutils = callPackage ../tools/misc/sutils { };
69876986
69886987 sword = callPackage ../development/libraries/sword { };
@@ -12211,6 +12210,9 @@ let
1221112210
1221212211 sage = callPackage ../applications/science/math/sage { };
1221312212
12213+ suitesparse_4_2 = callPackage ../development/libraries/science/math/suitesparse/4.2.nix { };
12214+ suitesparse_4_4_1 = callPackage ../development/libraries/science/math/suitesparse {};
12215+
1221412216 ipopt = callPackage ../development/libraries/science/math/ipopt { };
1221512217
1221612218 ### SCIENCE/MOLECULAR-DYNAMICS