Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
ThirdParty-common
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Development
ThirdParty-common
Commits
7958c7e4
Commit
7958c7e4
authored
Jun 05, 2020
by
Mark Olesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: shell syntax error in makePETSC
parent
67093bfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
makePETSC
makePETSC
+13
-14
No files found.
makePETSC
View file @
7958c7e4
...
@@ -6,11 +6,10 @@
...
@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
# \\/ M anipulation |
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Copyright (C) 2018-20
19
OpenCFD Ltd.
# Copyright (C) 2018-20
20
OpenCFD Ltd.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# License
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
# <http://www.gnu.org/licenses/>.
#
#
# Script
# Script
# makePETSC
# makePETSC
...
@@ -28,7 +27,7 @@
...
@@ -28,7 +27,7 @@
if
[
"
$1
"
=
"-test"
]
if
[
"
$1
"
=
"-test"
]
then
then
[
"$#"
-eq
2
]
||
{
echo
"
${
0
##*/
}
-test : needs 1 argument"
;
exit
1
;
}
[
"$#"
-eq
2
]
||
{
echo
"
${
0
##*/
}
-test : needs 1 argument"
;
exit
1
;
}
dir
=
"
${
2
%/
}
"
# <-
PETSC
_ARCH_PATH
dir
=
"
${
2
%/
}
"
# <-
*
_ARCH_PATH
if
[
-d
"
$dir
/include"
]
if
[
-d
"
$dir
/include"
]
then
then
for
lib
in
\
for
lib
in
\
...
@@ -101,7 +100,7 @@ do
...
@@ -101,7 +100,7 @@ do
targetType
=
"
$1
"
targetType
=
"
$1
"
;;
;;
petsc-[0-9]
*
)
petsc-[0-9]
*
|
petsc-git
)
petscPACKAGE
=
"
${
1
%%/
}
"
petscPACKAGE
=
"
${
1
%%/
}
"
unset
PETSC_ARCH_PATH
# Avoid inconsistency
unset
PETSC_ARCH_PATH
# Avoid inconsistency
;;
;;
...
@@ -115,11 +114,11 @@ done
...
@@ -115,11 +114,11 @@ done
[
-n
"
$petscPACKAGE
"
]
||
die
"The petsc-VERSION was not specified"
[
-n
"
$petscPACKAGE
"
]
||
die
"The petsc-VERSION was not specified"
# Nothing to build
# Nothing to build
if
_foamIsNone
$petscPACKAGE
if
_foamIsNone
"
$petscPACKAGE
"
then
then
echo
"Using petsc-none (skip ThirdParty build of PETSC)"
echo
"Using petsc-none (skip ThirdParty build of PETSC)"
exit
0
exit
0
elif
_foamIsSystem
$petscPACKAGE
elif
_foamIsSystem
"
$petscPACKAGE
"
then
then
echo
"Using petsc-system"
echo
"Using petsc-system"
exit
0
exit
0
...
@@ -132,7 +131,7 @@ fi
...
@@ -132,7 +131,7 @@ fi
# PETSC_ARCH_PATH : installation directory
# PETSC_ARCH_PATH : installation directory
# PETSC_SOURCE_DIR : location of the original sources
# PETSC_SOURCE_DIR : location of the original sources
PETSC_SOURCE_DIR
=
$sourceBASE
/
$petscPACKAGE
PETSC_SOURCE_DIR
=
"
$sourceBASE
/
$petscPACKAGE
"
:
"
${
PETSC_ARCH_PATH
:
=
$installBASE$WM_SIZE_OPTIONS
/
$petscPACKAGE
}
"
:
"
${
PETSC_ARCH_PATH
:
=
$installBASE$WM_SIZE_OPTIONS
/
$petscPACKAGE
}
"
[
-d
"
$PETSC_SOURCE_DIR
"
]
||
{
[
-d
"
$PETSC_SOURCE_DIR
"
]
||
{
...
@@ -148,7 +147,7 @@ echo
...
@@ -148,7 +147,7 @@ echo
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
archOpt
=
"
$WM_SIZE_OPTIONS
"
archOpt
=
"
$WM_SIZE_OPTIONS
"
# Configuration options
:
# Configuration options
configOpt
=
"--with-cc=
$(
whichMpicc
)
--with-cxx=
$(
whichMpicxx
)
"
configOpt
=
"--with-cc=
$(
whichMpicc
)
--with-cxx=
$(
whichMpicxx
)
"
if
[
"
$targetType
"
=
libso
]
if
[
"
$targetType
"
=
libso
]
...
@@ -173,11 +172,11 @@ echo
...
@@ -173,11 +172,11 @@ echo
cd
"
$PETSC_SOURCE_DIR
"
||
exit
cd
"
$PETSC_SOURCE_DIR
"
||
exit
export
GIT_DIR
=
"
$PWD
/.git"
# Mask seeing our own git-repo
export
GIT_DIR
=
"
$PWD
/.git"
# Mask seeing our own git-repo
rm
-rf
$PETSC_ARCH_PATH
rm
-rf
"
$PETSC_ARCH_PATH
"
./configure
\
./configure
\
--prefix
=
$PETSC_ARCH_PATH
\
--prefix
=
"
$PETSC_ARCH_PATH
"
\
--with-petsc-arch
=
$archOpt
\
--with-petsc-arch
=
"
$archOpt
"
\
--with-clanguage
=
C
\
--with-clanguage
=
C
\
--with-scalapack
=
0
\
--with-scalapack
=
0
\
--with-superlu_dist
=
0
\
--with-superlu_dist
=
0
\
...
@@ -185,9 +184,9 @@ echo
...
@@ -185,9 +184,9 @@ echo
--download-f2cblaslapack
=
1
\
--download-f2cblaslapack
=
1
\
$configOpt
\
$configOpt
\
&&
echo
"Configured: petsc"
\
&&
echo
"Configured: petsc"
\
&&
make
PETSC_DIR
=
$PETSC_SOURCE_DIR
PETSC_ARCH
=
"
$archOpt
"
all
\
&&
make
PETSC_DIR
=
"
$PETSC_SOURCE_DIR
"
PETSC_ARCH
=
"
$archOpt
"
all
\
&&
echo
"Built: petsc"
\
&&
echo
"Built: petsc"
\
&&
make
PETSC_DIR
=
$PETSC_SOURCE_DIR
PETSC_ARCH
=
"
$archOpt
"
install
&&
make
PETSC_DIR
=
"
$PETSC_SOURCE_DIR
"
PETSC_ARCH
=
"
$archOpt
"
install
\
&&
echo
"Installed: petsc"
&&
echo
"Installed: petsc"
)
||
{
)
||
{
echo
"Error building: petsc"
echo
"Error building: petsc"
...
...
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