Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
ThirdParty-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Development
ThirdParty-common
Commits
7958c7e4
Commit
7958c7e4
authored
5 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
BUG: shell syntax error in makePETSC
parent
67093bfb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
makePETSC
+13
-14
13 additions, 14 deletions
makePETSC
with
13 additions
and
14 deletions
makePETSC
+
13
−
14
View file @
7958c7e4
...
...
@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018-20
19
OpenCFD Ltd.
# Copyright (C) 2018-20
20
OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makePETSC
...
...
@@ -28,7 +27,7 @@
if
[
"
$1
"
=
"-test"
]
then
[
"$#"
-eq
2
]
||
{
echo
"
${
0
##*/
}
-test : needs 1 argument"
;
exit
1
;
}
dir
=
"
${
2
%/
}
"
# <-
PETSC
_ARCH_PATH
dir
=
"
${
2
%/
}
"
# <-
*
_ARCH_PATH
if
[
-d
"
$dir
/include"
]
then
for
lib
in
\
...
...
@@ -101,7 +100,7 @@ do
targetType
=
"
$1
"
;;
petsc-[0-9]
*
)
petsc-[0-9]
*
|
petsc-git
)
petscPACKAGE
=
"
${
1
%%/
}
"
unset
PETSC_ARCH_PATH
# Avoid inconsistency
;;
...
...
@@ -115,11 +114,11 @@ done
[
-n
"
$petscPACKAGE
"
]
||
die
"The petsc-VERSION was not specified"
# Nothing to build
if
_foamIsNone
$petscPACKAGE
if
_foamIsNone
"
$petscPACKAGE
"
then
echo
"Using petsc-none (skip ThirdParty build of PETSC)"
exit
0
elif
_foamIsSystem
$petscPACKAGE
elif
_foamIsSystem
"
$petscPACKAGE
"
then
echo
"Using petsc-system"
exit
0
...
...
@@ -132,7 +131,7 @@ fi
# PETSC_ARCH_PATH : installation directory
# 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
}
"
[
-d
"
$PETSC_SOURCE_DIR
"
]
||
{
...
...
@@ -148,7 +147,7 @@ echo
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
archOpt
=
"
$WM_SIZE_OPTIONS
"
# Configuration options
:
# Configuration options
configOpt
=
"--with-cc=
$(
whichMpicc
)
--with-cxx=
$(
whichMpicxx
)
"
if
[
"
$targetType
"
=
libso
]
...
...
@@ -173,11 +172,11 @@ echo
cd
"
$PETSC_SOURCE_DIR
"
||
exit
export
GIT_DIR
=
"
$PWD
/.git"
# Mask seeing our own git-repo
rm
-rf
$PETSC_ARCH_PATH
rm
-rf
"
$PETSC_ARCH_PATH
"
./configure
\
--prefix
=
$PETSC_ARCH_PATH
\
--with-petsc-arch
=
$archOpt
\
--prefix
=
"
$PETSC_ARCH_PATH
"
\
--with-petsc-arch
=
"
$archOpt
"
\
--with-clanguage
=
C
\
--with-scalapack
=
0
\
--with-superlu_dist
=
0
\
...
...
@@ -185,9 +184,9 @@ echo
--download-f2cblaslapack
=
1
\
$configOpt
\
&&
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"
\
&&
make
PETSC_DIR
=
$PETSC_SOURCE_DIR
PETSC_ARCH
=
"
$archOpt
"
install
&&
make
PETSC_DIR
=
"
$PETSC_SOURCE_DIR
"
PETSC_ARCH
=
"
$archOpt
"
install
\
&&
echo
"Installed: petsc"
)
||
{
echo
"Error building: petsc"
...
...
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