Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #How to compile suitesparse on Win64
- #(How I did it, at least)
- #download msys2 from
- #http://www.msys2.org/
- #Remember to download the x86_64 version
- #Get stuff up to date as described on the website:
- pacman -Syu
- #probably need to close the program at this point, then restart and
- pacman -Syu
- #install make
- pacman -S make
- #install gcc toolchain, you can search available packages with
- pacman -Ss gcc
- #for me, the latest version was
- pacman -S mingw64/mingw-w64-x86_64-gcc
- #again, remember to get the 64bit version (NOT i686)
- #see e.g. https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2 for more info
- #install fortran toolchain
- #either by searching
- pacman -Ss fortran
- #or directly
- pacman -S mingw64/mingw-w64-x86_64-gcc-fortran
- #download openblas 64 bit binaries, or alternatively compile from source by simply opening mingw64,
- #travelling to the source directory and typing make
- #http://www.openblas.net/
- #download compiled binaries for LAPACK if you wanna use CHOLMOD, from
- #http://icl.cs.utk.edu/lapack-for-windows/lapack/index.html#libraries
- #for typical electrical-machine-size problems UMFPACK+AMD alone works just as well.
- #download compiled binaries for metis if you wanna use it with CHOLMOD
- #http://www.opentelemac.org/index.php/component/jdownloads/summary/23-installation-files/158-metis-5-0-2-compiled-on-windows-with-mingw-s-gfortran-64bit?Itemid=54
- ######################################################
- # configuring suitesparse makefile
- #download suitesparse source
- #make the following modifications to SuiteSparse_config/SuiteSparse_config.mk:
- #add -DNTIMER flag to the compiler flags (CF) (otherwise compiler throws an error about clock_monotonic)
- #you might need to add -mwindows to the flags too, I'm not sure.
- #add -shared to LDLIBS
- #add also -Wl,--out-implib,$(LIBRARY).a if you want .a files that gcc can link (if used with Matlab)
- #specify BLAS and LAPACK paths in the end of the # required libraries section, e.g.
- BLAS= -Lc:/Antti/Software/OB/lib -lopenblas -lpthread -lgfortran
- LAPACK= -Lc:/Antti/Software/LAPACK/ -llapack
- #you might need to use quotation marks if your path contains whitespaces, I dunno
- #under Shell commands section, specify compilers:
- CC = gcc
- F77 = gfortran
- #if you don't wanna use CHOLMOD with UMFPACK, under section UMFPACK Configuration set
- UMFPACK_CONFIG = -DNCHOLMOD
- #if you don't wanna use metis with CHOLMOD, under CHOLMOD Configuration append the flag
- -DNPARTITION
- #to CHOLMOD_CONFIG
- ##################################
- # now the compiling:
- #if you only need UMFPACK, the following suffices.
- #Open MinGW and travel to the suitesparse main directory
- cd SuiteSparse_config
- make
- cd ..
- cd AMD
- make library #demos don't works
- cd ..
- cd UMFPACK
- make library
- #if you need entire suitesparse (you'll need LAPACK for this, plus either download metis, or disable it with -DNPARTITION), simply type
- make library
- #in the main suitesparse directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement