Changes

Jump to navigation Jump to search
1,865 bytes added ,  03:53, 31 October 2016
Line 166: Line 166:  
  wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz
 
  wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz
   −
To be continued...
+
Save the code below to $downloads/UMFPACK_Demo_Makefile-4.5.3.patch
    +
{{Code|UMFPACK_Demo_Makefile-4.5.3.patch|<pre>
 +
--- UMFPACK/Demo/Makefile.orig 2016-09-19 16:20:46.317044240 +0200
 +
+++ UMFPACK/Demo/Makefile 2016-09-19 16:30:15.079302070 +0200
 +
@@ -27,9 +27,9 @@
 +
C = $(CC) $(CF) $(UMFPACK_CONFIG) $(CONFIG_PARTITION) \
 +
    -I../../include
 +
 +
-LIBS = $(LDLIBS) -L../../lib -lumfpack -lamd -lsuitesparseconfig \
 +
+LIBS = $(LDFLAGS) $(LDLIBS) -L../../lib -lumfpack -lamd -lsuitesparseconfig \
 +
$(LIB_WITH_CHOLMOD) $(LAPACK) $(BLAS)
 +
 +
libs: metis
 +
( cd ../../SuiteSparse_config ; $(MAKE) )
 +
( cd ../../AMD ; $(MAKE) library )
   −
To be continued...
+
</pre>
 +
}}
 +
 
 +
 
 +
cd $buildroot
 +
tar --no-same-owner -xvf $downloads/SuiteSparse-4.5.3.tar.gz
 +
mv SuiteSparse SuiteSparse-4.5.3
 +
cd SuiteSparse-4.5.3/
 +
 +
patch -p0 < $downloads/UMFPACK_Demo_Makefile-4.5.3.patch
 +
# should get: "patching file UMFPACK/Demo/Makefile"
 +
 
 +
If the following command
 +
 
 +
find . -name Makefile -exec grep "LDLIBS +=" {} \; -print
 +
 
 +
yields {{codeline|LDLIBS}} lines not starting with {{codeline|override}},
 +
then the patch sent upstream has not been applied,
 +
and we should do it here:
 +
 
 +
find . -name Makefile -exec sed -i 's/LDLIBS +=/override LDLIBS +=/g' {} \;
 +
 
 +
Now we are ready to build SuiteSparse
 +
 
 +
make -j6 LAPACK= CF="-march=native -O3 -fexceptions -fPIC -fopenmp" F77FLAGS="-march=native -O3" LDFLAGS="-L/usr/local/build/SuiteSparse-4.5.3/lib -L/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64" LDLIBS="-lm -lrt -Wl,-rpath=/usr/local/build/SuiteSparse-4.5.3/lib:/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64"
 +
 
 +
fix RUN_PATH and install
 +
 
 +
cp -Rdp lib lib_chrpath
 +
patchelf --set-rpath /usr/local/gcc-6.2.0_binutils-2.27_isl/lib64 lib_chrpath/*
 +
sudo cp lib_chrpath/* /usr/local/gcc-6.2.0_binutils-2.27_isl/lib64/
 +
sudo mkdir /usr/local/gcc-6.2.0_binutils-2.27_isl/include/suitesparse/
 +
sudo cp include/* /usr/local/gcc-6.2.0_binutils-2.27_isl/include/suitesparse/
32

edits

Navigation menu