Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_pdata
Commits
6798c748
Commit
6798c748
authored
Feb 04, 2016
by
jenkins
Browse files
Fixing installation on OSX
parent
496b5893
Changes
4
Hide whitespace changes
Inline
Side-by-side
install
View file @
6798c748
...
...
@@ -181,7 +181,7 @@ else
fi
./script/install_OPENBLAS.sh
$i_dir
$compiler_opt
LAPACK_installed
=
1
blas_options
=
"--with-blas=-L
/home/i-b
ir
d
/OPENBLAS/lib/ -lopenblas"
blas_options
=
"--with-blas=-L
$i_d
ir
/OPENBLAS/lib/ -lopenblas"
elif
[
$conf_err
-eq
205
]
;
then
## First we install openblas, we ignore default lapack
## this SuiteSparse is programmed to use libopenblas
...
...
@@ -192,7 +192,7 @@ else
fi
./script/install_OPENBLAS.sh
$i_dir
$compiler_opt
LAPACK_installed
=
1
blas_options
=
"--with-blas=-L
/home/i-b
ir
d
/OPENBLAS/lib/ -lopenblas"
blas_options
=
"--with-blas=-L
$i_d
ir
/OPENBLAS/lib/ -lopenblas"
## Then suite sparse
echo
"SuiteSparse not found try to install"
...
...
m4/ax_suitesparse.m4
View file @
6798c748
...
...
@@ -66,9 +66,28 @@ AC_ARG_WITH(suitesparse,
SUITESPARSE_INCLUDE="-I$with_suitesparse/include"
])
#
# Platform specific setup
#
#############################
AC_CANONICAL_HOST
# Check for which host we are on and setup a few things
# specifically based on the host
case $host_os in
darwin* )
RT_LIB=""
;;
linux*)
RT_LIB="-lrt"
;;
*)
RT_LIB="-lrt"
;;
esac
# First, check SUITESPARSE_LIBS environment variable
if test "x$SUITESPARSE_LIBS" != x; then
save_LIBS="$LIBS"; LIBS="$SUITESPARSE_LIBS -lumfpack -lm -lsuitesparseconfig
-lrt
"
save_LIBS="$LIBS"; LIBS="$SUITESPARSE_LIBS -lumfpack -lm -lsuitesparseconfig
$RT_LIB
"
AC_MSG_CHECKING([for umf_l_malloc])
AC_TRY_LINK_FUNC(umf_l_malloc, [ax_suitesparse_ok=yes
SUITESPARSE_LIB="$SUITESPARSE_LIBS -lamd -lbtf -lcamd -lccolamd -lcholmod -lcolamd -lcxsparse -lklu -ldl -lrbio -lspqr -lsuitesparseconfig -lumfpack"], [SUITRSPARSE_LIBS=""])
...
...
openfpm_numerics
@
62456127
Subproject commit
4ebf01b5555842abda2fc91a8dd364b32023f239
Subproject commit
624561273e0e2750890cb8c0b87b0d1119ffb956
script/install_SUITESPARSE.sh
View file @
6798c748
#! /bin/bash
source
script/discover_os
discover_os
# check if the directory $1/SUITESPARSE exist
if
[
-d
"
$1
/SUITESPARSE"
]
;
then
...
...
@@ -18,14 +22,36 @@ cd SuiteSparse
# configuration
sed
-i
"/INSTALL_LIB
\s
=
\s\/
usr
\/
local
\/
lib/c
\I
NSTALL_LIB =
$1
\/
SUITESPARSE
\/
lib"
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/INSTALL_INCLUDE
\s
=
\s\/
usr
\/
local
\/
include/c
\I
NSTALL_INCLUDE =
$1
\/
SUITESPARSE
\/
include"
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/
\s
LAPACK
\s
=
\s
-llapack/c
\L
APACK = "
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/
\s
BLAS
\s
=
\s\-
lopenblas/c
\B
LAS = -L
$1
/OPENBLAS/lib -lopenblas"
SuiteSparse_config/SuiteSparse_config.mk
if
[
x
"
$platform
"
==
x
"osx"
]
;
then
# installation for OSX
sed
-i
""
-e
"s|INSTALL_LIB =
\/
usr
\/
local
\/
lib|INSTALL_LIB = "
$1
"
\/
SUITESPARSE
\/
lib|"
SuiteSparse_config/SuiteSparse_config_Mac.mk
sed
-i
""
-e
"s|INSTALL_INCLUDE =
\/
usr
\/
local
\/
include|INSTALL_INCLUDE = "
$1
"
\/
SUITESPARSE
\/
include|"
SuiteSparse_config/SuiteSparse_config_Mac.mk
sed
-i
""
-e
"s| LAPACK = -llapack|LAPACK = |"
SuiteSparse_config/SuiteSparse_config_Mac.mk
sed
-i
""
-e
"s| BLAS = -lopenblas|BLAS = -L"
$1
"/OPENBLAS/lib -lopenblas|"
SuiteSparse_config/SuiteSparse_config_Mac.mk
### Overwrite SuiteSparse_config.mk
rm
SuiteSparse_config/SuiteSparse_config.mk
mv
SuiteSparse_config/SuiteSparse_config_Mac.mk SuiteSparse_config/SuiteSparse_config.mk
else
# Installation for linux
sed
-i
"/INSTALL_LIB
\s
=
\s\/
usr
\/
local
\/
lib/c
\I
NSTALL_LIB =
$1
\/
SUITESPARSE
\/
lib"
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/INSTALL_INCLUDE
\s
=
\s\/
usr
\/
local
\/
include/c
\I
NSTALL_INCLUDE =
$1
\/
SUITESPARSE
\/
include"
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/
\s
LAPACK
\s
=
\s
-llapack/c
\L
APACK = "
SuiteSparse_config/SuiteSparse_config.mk
sed
-i
"/
\s
BLAS
\s
=
\s\-
lopenblas/c
\B
LAS = -L
$1
/OPENBLAS/lib -lopenblas"
SuiteSparse_config/SuiteSparse_config.mk
fi
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:
$1
/OPENBLAS/lib"
make
if
[
$?
!=
0
]
;
then
echo
"Fail to compile SuiteSparse"
exit
1
fi
mkdir
$1
/SUITESPARSE
mkdir
$1
/SUITESPARSE/lib
mkdir
$1
/SUITESPARSE/include
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment