Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
89f2003f
Commit
89f2003f
authored
8 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Fixing OSX installation
parent
7dd825c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
script/install_PETSC.sh
+37
-47
37 additions, 47 deletions
script/install_PETSC.sh
script/pre_req
+1
-1
1 addition, 1 deletion
script/pre_req
with
38 additions
and
48 deletions
script/install_PETSC.sh
+
37
−
47
View file @
89f2003f
...
...
@@ -10,8 +10,19 @@ fi
# Detect gcc pr clang
source
script/detect_gcc
source
script/discover_os
detect_gcc_or_clang g++
discover_os
##### if we are on osx we use gsed
if
[
x
"
$platform
"
==
x
"osx"
]
;
then
sed_command
=
gsed
else
sed_command
=
sed
fi
####
## If some dependencies has been installed feed them to PETSC
...
...
@@ -150,37 +161,21 @@ if [ ! -d "$1/MUMPS" ]; then
cd
MUMPS_5.0.1
cp
Make.inc/Makefile.inc.generic Makefile.inc
if
[
x
"
$platform
"
=
x
"osx"
]
;
then
# installation for OSX
sed
-i
""
-e
"s|CC = cc|CC = mpicc|"
Makefile.inc
sed
-i
""
-e
"s|FC = f90| FC = mpif90|"
Makefile.inc
sed
-i
""
-e
"s|FL = f90| FL = mpif90|"
Makefile.inc
sed
-i
""
-e
"s|SCALAP = -lscalapack -lblacs|SCALAP = -L
$1
/SCALAPACK/lib -L
$1
/OPENBLAS/lib -lscalapack|"
Makefile.inc
sed
-i
""
-e
"s|LIBBLAS = -lblas|LIBBLAS = -lopenblas|"
Makefile.inc
sed
-i
""
-e
"s|OPTF = -O|OPTF = -fpic -O3"
Makefile.inc
sed
-i
""
-e
"s|OPTC = -O -I.|OPTC = -fpic -O3 -I."
Makefile.inc
sed
-i
""
-e
"s|OPTL = -O|OPTL = -fpic -O3"
Makefile.inc
else
# Installation for linux
# Installation for linux
se
d
-i
"/CC
\s\+
=
\s
cc/c
\C
C = mpicc"
Makefile.inc
se
d
-i
"/FC
\s\+
=
\s
f90/c
\F
C = mpif90"
Makefile.inc
se
d
-i
"/FL
\s\+
=
\s
f90/c
\F
L = mpif90"
Makefile.inc
$sed_comman
d
-i
"/CC
\s\+
=
\s
cc/c
\C
C = mpicc"
Makefile.inc
$sed_comman
d
-i
"/FC
\s\+
=
\s
f90/c
\F
C = mpif90"
Makefile.inc
$sed_comman
d
-i
"/FL
\s\+
=
\s
f90/c
\F
L = mpif90"
Makefile.inc
se
d
-i
"/SCALAP
\s\+
=
\s
-lscalapack
\s
-lblacs/c
\S
CALAP = -L
$1
/SCALAPACK/lib -L
$1
/OPENBLAS/lib -lscalapack"
Makefile.inc
se
d
-i
"/LIBBLAS
\s\+
=
\s\-
lopenblas/c
\L
IBBLAS = -lopenblas"
Makefile.inc
$sed_comman
d
-i
"/SCALAP
\s\+
=
\s
-lscalapack
\s
-lblacs/c
\S
CALAP = -L
$1
/SCALAPACK/lib -L
$1
/OPENBLAS/lib -lscalapack"
Makefile.inc
$sed_comman
d
-i
"/LIBBLAS
\s\+
=
\s\-
lopenblas/c
\L
IBBLAS = -lopenblas"
Makefile.inc
se
d
-i
"/OPTF
\s\+
=
\s\-
O/c
\O
PTF = -fpic -O3"
Makefile.inc
se
d
-i
"/OPTC
\s\+
=
\s\-
O
\s
-I./c
\O
PTC = -fpic -O3 -I."
Makefile.inc
se
d
-i
"/OPTL
\s\+
=
\s\-
O/c
\O
PTL = -fpic -O3"
Makefile.inc
$sed_comman
d
-i
"/OPTF
\s\+
=
\s\-
O/c
\O
PTF = -fpic -O3"
Makefile.inc
$sed_comman
d
-i
"/OPTC
\s\+
=
\s\-
O
\s
-I./c
\O
PTC = -fpic -O3 -I."
Makefile.inc
$sed_comman
d
-i
"/OPTL
\s\+
=
\s\-
O/c
\O
PTL = -fpic -O3"
Makefile.inc
se
d
-i
"/LIBBLAS
\s
=
\s
-lblas/c
\L
IBBLAS = -lopenblas"
Makefile.inc
$sed_comman
d
-i
"/LIBBLAS
\s
=
\s
-lblas/c
\L
IBBLAS = -lopenblas"
Makefile.inc
fi
make
-j
$2
if
[
$?
-eq
0
]
;
then
...
...
@@ -214,38 +209,33 @@ if [ ! -d "$1/SUPERLU_DIST" ]; then
tar
-xf
superlu_dist_4.3.tar.gz
cd
SuperLU_DIST_4.3
if
[
x
"
$platform
"
=
x
"osx"
]
;
then
# installation for OSX
echo
"OSX TO DO BYE"
exit
1
else
# Installation for linux
# Installation for linux
sed
-i
"/DSuperLUroot
\s\+
=
\s\$
{HOME}
\/
Release_Codes
\/
SuperLU_DIST_4.3/c
\D
SuperLUroot = ../"
make.inc
# sed -i "/DSUPERLULIB\s\+=\s../lib//c\DSUPERLULIB = ../lib/libsuperlu_4.3.a" make.inc
sed
-i
"/BLASLIB
\s\+
=/c
\B
LASLIB =
$1
/OPENBLAS/lib/libopenblas.a"
make.inc
sed
-i
"/LOADOPTS
\s\+
=
\s
-openmp/c
\L
OADOPTS = -fopenmp"
make.inc
sed
-i
"/PARMETIS_DIR
\s\+
=
\/
project
\/
projectdirs
\/
mp127
\/
parmetis-4.0.3-g/c
\P
ARMETIS_DIR :=
$1
/PARMETIS"
make.inc
$sed_command
-i
"/DSuperLUroot
\s\+
=
\s\$
{HOME}
\/
Release_Codes
\/
SuperLU_DIST_4.3/c
\D
SuperLUroot = ../"
make.inc
$sed_command
-i
"/BLASLIB
\s\+
=/c
\B
LASLIB =
$1
/OPENBLAS/lib/libopenblas.a"
make.inc
$sed_command
-i
"/LOADOPTS
\s\+
=
\s
-openmp/c
\L
OADOPTS = -fopenmp"
make.inc
$sed_command
-i
"/PARMETIS_DIR
\s\+
=
\/
project
\/
projectdirs
\/
mp127
\/
parmetis-4.0.3-g/c
\P
ARMETIS_DIR :=
$1
/PARMETIS"
make.inc
se
d
-i
"/METISLIB
\s
:=
\s
-L
\$
{PARMETIS_DIR}
\/
build
\/
Linux-x86_64
\/
libmetis
\s
-lmetis/c
\M
ETISLIB := -L
$1
/METIS/lib -lmetis"
make.inc
se
d
-i
"/PARMETISLIB
\s
:=
\s
-L
\$
{PARMETIS_DIR}
\/
build
\/
Linux-x86_64
\/
libparmetis
\s
-lparmetis/c
\P
ARMETISLIB := -L
$1
/PARMETIS/lib -lparmetis"
make.inc
$sed_comman
d
-i
"/METISLIB
\s
:=
\s
-L
\$
{PARMETIS_DIR}
\/
build
\/
Linux-x86_64
\/
libmetis
\s
-lmetis/c
\M
ETISLIB := -L
$1
/METIS/lib -lmetis"
make.inc
$sed_comman
d
-i
"/PARMETISLIB
\s
:=
\s
-L
\$
{PARMETIS_DIR}
\/
build
\/
Linux-x86_64
\/
libparmetis
\s
-lparmetis/c
\P
ARMETISLIB := -L
$1
/PARMETIS/lib -lparmetis"
make.inc
sed
-i
"/I_PARMETIS
\s
:=
\s
-I
\$
{PARMETIS_DIR}
\/
include
\s
-I
\$
{PARMETIS_DIR}
\/
metis
\/
include/c
\I
_PARMETIS := -I
$1
/PARMETIS/include -I
$1
/METIS/include"
make.inc
sed
-i
"/CC
\s\+
=
\s
cc/c
\C
C = mpicc"
make.inc
sed
-i
"/FORTRAN
\s\+
=
\s
ftn/c
\F
ORTRAN = mpif90"
make.inc
sed
-i
"/CFLAGS
\s\+
=
\s
-fast
\s
-m64
\s
-std=c99
\s
-Wall
\s
-openmp
\s\\\/
c
\C
FLAGS =-fpic -O3 -m64 -std=c99 -Wall -fopenmp
\$
(I_PARMETIS) -DDEBUGlevel=0 -DPRNTlevel=0 -DPROFlevel=0"
make.inc
sed
-i
"/
\s\$
(I_PARMETIS)
\s
-DDEBUGlevel=0
\s
-DPRNTlevel=0
\s
-DPROFlevel=0
\s\\\/
c
\
"
make.inc
$sed_command
-i
"/I_PARMETIS
\s
:=
\s
-I
\$
{PARMETIS_DIR}
\/
include
\s
-I
\$
{PARMETIS_DIR}
\/
metis
\/
include/c
\I
_PARMETIS := -I
$1
/PARMETIS/include -I
$1
/METIS/include"
make.inc
$sed_command
-i
"/CC
\s\+
=
\s
cc/c
\C
C = mpicc"
make.inc
$sed_command
-i
"/FORTRAN
\s\+
=
\s
ftn/c
\F
ORTRAN = mpif90"
make.inc
if
[
x
"
$dgc_compiler
"
==
x
"clang++"
]
;
then
$sed_command
-i
"/CFLAGS
\s\+
=
\s
-fast
\s
-m64
\s
-std=c99
\s
-Wall
\s
-openmp
\s\\\/
c
\C
FLAGS =-fpic -O3 -m64 -std=c99 -Wall
\$
(I_PARMETIS) -DDEBUGlevel=0 -DPRNTlevel=0 -DPROFlevel=0"
make.inc
else
$sed_command
-i
"/CFLAGS
\s\+
=
\s
-fast
\s
-m64
\s
-std=c99
\s
-Wall
\s
-openmp
\s\\\/
c
\C
FLAGS =-fpic -O3 -m64 -std=c99 -Wall -fopenmp
\$
(I_PARMETIS) -DDEBUGlevel=0 -DPRNTlevel=0 -DPROFlevel=0"
make.inc
fi
$sed_command
-i
"/
\s\$
(I_PARMETIS)
\s
-DDEBUGlevel=0
\s
-DPRNTlevel=0
\s
-DPROFlevel=0
\s\\\/
c
\
"
make.inc
make
if
[
$?
-eq
0
]
;
then
mkdir
$1
/SUPERLU_DIST
mkdir
$1
/SUPERLU_DIST/include
cp
-r
lib
/
$1
/SUPERLU_DIST
cp
-r
lib
$1
/SUPERLU_DIST
cp
SRC/
*
.h
$1
/SUPERLU_DIST/include
configure_options
=
"
$configure_options
--with-superlu_dist=yes --with-superlu_dist-lib=
$1
/SUPERLU_DIST/lib/libsuperlu_dist_4.3.a --with-superlu_dist-include=
$1
/SUPERLU_DIST/include/"
fi
...
...
This diff is collapsed.
Click to expand it.
script/pre_req
+
1
−
1
View file @
89f2003f
...
...
@@ -70,7 +70,7 @@ fi
#### if we are on OSX we install gnu-sed
if
[
x
"platform"
==
x
"osx"
]
if
[
x
"
$
platform
"
==
x
"osx"
]
;
then
command
-v
gsed
>
/dev/null 2>&1
if
[
$?
-ne
0
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment