Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-course
Commits
6e2caa44
Commit
6e2caa44
authored
Mar 31, 2020
by
Ned Coltman
Browse files
[install] Update install script to pre-3.2 release status
parent
2c496ddf
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/install.opts
deleted
100644 → 0
View file @
2c496ddf
GXX_RELEASE_WARNING_OPTS=" \
-Wall \
-Wno-deprecated \
-Wno-deprecated-declarations \
-Wno-sign-compare"
GXX_RELEASE_OPTS=" \
-fno-strict-aliasing \
-fstrict-overflow \
-fno-finite-math-only \
-O3 \
-march=native \
-funroll-loops \
-g0"
CMAKE_FLAGS="
-DCMAKE_C_COMPILER=/usr/bin/gcc
-DCMAKE_CXX_COMPILER=/usr/bin/g++
-DCMAKE_CXX_FLAGS_RELEASE='$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS'
-DCMAKE_CXX_FLAGS_DEBUG='-O0 -ggdb -Wall'
-DCMAKE_BUILD_TYPE=Release
"
scripts/install.sh
View file @
6e2caa44
# One click install script dumux
DUNE_VERSION
=
2.6
echo
" "
echo
" "
echo
"*********************************************************************************************"
echo
"(0/4) Checking all prerequistes. (git cmake gcc g++ wget pkg-config gnuplot umfpack)"
echo
"*********************************************************************************************"
# check some prerequistes
for
PRGRM
in
git cmake gcc g++ wget paraview pkg-config gnuplot
;
do
...
...
@@ -18,25 +22,34 @@ for LIBRARY in libumfpack; do
done
currentver
=
"
$(
gcc
-dumpversion
)
"
requiredver
=
"
4.9.0
"
requiredver
=
"
7
"
if
[
"
$(
printf
'%s\n'
"
$requiredver
"
"
$currentver
"
|
sort
-V
|
head
-n1
)
"
!=
"
$requiredver
"
]
;
then
echo
"gcc greater than or equal to
$requiredver
is required!"
>
&2
exit
1
fi
if
[
$?
-ne
0
]
;
then
echo
"*********************************************************************************************"
echo
"(0/4) An error occured while checking for prerequistes."
echo
"*********************************************************************************************"
exit
$?
else
echo
"*********************************************************************************************"
echo
"(1/4) All prerequistes found."
echo
"*********************************************************************************************"
fi
echo
" "
echo
"**************************************************************************************************************"
echo
"(1/4) Downloading supplementary files (test script & cmake.opts). Make sure to be connected to the internet."
echo
"**************************************************************************************************************"
# make a new folder containing everything
mkdir
$(
pwd
)
/dumux
cd
dumux
echo
"*********************************************************************************************"
echo
"Sucessfully created a folder dumux."
echo
"*********************************************************************************************"
echo
"*********************************************************************************************"
echo
"(0/2) Downloading supplementary files. Make sure to be connected to the internet."
echo
"*********************************************************************************************"
# download the test script and the install.opts
# download the test script and the cmake.opts
if
[
!
-f
"test_dumux.sh"
]
;
then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/scripts/test_dumux.sh
fi
...
...
@@ -46,19 +59,31 @@ if [ ! -f "cmake.opts" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/cmake.opts
fi
if
[
$?
-ne
0
]
;
then
echo
"*********************************************************************************************"
echo
"(1/4) An error occured while downloading supplementary files."
echo
"*********************************************************************************************"
exit
$?
else
echo
"*********************************************************************************************"
echo
"(2/4) All supplementary files downloaded."
echo
"*********************************************************************************************"
fi
echo
" "
echo
"*********************************************************************************************"
echo
"(
1/2
) Cloning repositories. This may take a while. Make sure to be connected to the internet."
echo
"(
2/4
) Cloning repositories. This may take a while. Make sure to be connected to the internet."
echo
"*********************************************************************************************"
DUNE_VERSION
=
2.7
# the core modules
for
MOD
in
common geometry grid localfunctions istl
;
do
if
[
!
-d
"dune-
$MOD
"
]
;
then
git clone
-b
releases/
$DUNE_VERSION
https://gitlab.dune-project.org/core/dune-
$MOD
.git
else
echo
"Skip cloning dune-
$MOD
because the folder already exists."
git checkout releases/
$DUNE_VERSION
fi
cd
dune-
$MOD
git checkout releases/
$DUNE_VERSION
cd
..
done
# extension modules
...
...
@@ -67,58 +92,66 @@ for MOD in dune-foamgrid dune-alugrid; do
git clone
-b
releases/
$DUNE_VERSION
https://gitlab.dune-project.org/extensions/
$MOD
.git
else
echo
"Skip cloning
$MOD
because the folder already exists."
git checkout releases/
$DUNE_VERSION
fi
cd
$MOD
git checkout releases/
$DUNE_VERSION
cd
..
done
# dune-subgrid
if
[
!
-d
"dune-subgrid"
]
;
then
git clone
-b
releases/
$DUNE_VERSION
-1
https://git.imp.fu-berlin.de/agnumpde/dune-subgrid.git
git clone
-b
releases/
2.6
-1
https://git.imp.fu-berlin.de/agnumpde/dune-subgrid.git
else
echo
"Skip cloning dune-subgrid because the folder already exists."
git checkout releases/2.6-1
fi
cd
dune-subgrid
git checkout releases/
$DUNE_VERSION
-1
cd
..
# dumux
if
[
!
-d
"dumux"
]
;
then
git clone
-b
releases/3.0 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
#git clone -b releases/3.2 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
else
echo
"Skip cloning dumux because the folder already exists."
#git checkout releases/3.2
git checkout master
fi
# dumux-course
if
[
!
-d
"dumux-course"
]
;
then
git clone
-b
releases/3.0 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git
# git clone -b releases/3.2 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git
git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git
else
echo
"Skip cloning dumux-course because the folder already exists."
#git checkout releases/3.2
git checkout master
fi
if
[
$?
-ne
0
]
;
then
echo
"*********************************************************************************************"
echo
"Failed to clone the repositories."
echo
"
(2/4)
Failed to clone the repositories.
Look for repository specific errors.
"
echo
"*********************************************************************************************"
exit
$?
else
echo
"*********************************************************************************************"
echo
"(3/4) All repositories have been cloned into a containing folder."
echo
"*********************************************************************************************"
fi
echo
"*********************************************************************************************"
echo
"(2/2) Configure dune modules and dumux. Build the dune libaries. This may take several minutes."
echo
"*********************************************************************************************"
# run build
echo
" "
echo
"**************************************************************************************************"
echo
"(3/4) Configure and build dune modules and dumux using dunecontrol. This may take several minutes."
echo
"**************************************************************************************************"
# run dunecontrol
./dune-common/bin/dunecontrol
--opts
=
cmake.opts all
#
if
[
$?
-ne
0
]
;
then
echo
"*********************************************************************************************"
echo
"Failed to build the dune libaries."
echo
"
(3/4)
Failed to build the dune libaries."
echo
"*********************************************************************************************"
exit
$?
else
echo
"*****************************************************************************************************"
echo
"(4/4) Succesfully configured and built dune and dumux."
echo
" Please change to the dumux folder and run the test_dumux.sh script to confirm everything works."
echo
"*****************************************************************************************************"
fi
# echo result
echo
"*********************************************************************************************"
echo
"Succesfully configured and built dune and dumux."
echo
"Please change to the dumux folder and run the test_dumux.sh script to confirm everything works."
echo
"*********************************************************************************************"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment