GGI AMG coarsening with dynamic lists
[foam-extend-4.0.git] / ThirdParty / AllMake.stage2
blobb8d04fdebb9887a953664ee60de1e85391296d6b
1 #!/bin/bash
2 #------------------------------------------------------------------------------
3 # ========= |
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration |
6 # \\ / A nd | For copyright notice see file Copyright
7 # \\/ M anipulation |
8 #------------------------------------------------------------------------------
9 # License
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 # Script
26 # AllMake.stage2
28 # Description
29 # Build script for ThirdParty packages: Stage2
31 # Communication libraries
33 # Once this stage is built, you would normally re-initialize your
34 # foam-extend environment in order redirect foam-extend toward the
35 # appropriate communication library
37 # NOTE: This stage is optional. Use it only if you want to override
38 # your system communication libraries
40 # Requirements:
41 # 1: Your foam-extend environment must be properly initialized
42 # 2: AllMake.stage1 if you are overriding your system compiler
43 # 3: The file etc/prefs.sh should be used for setting the variables
44 # enabling the compilation of the various packages
46 # Author:
47 # Martin Beaudoin, Hydro-Quebec, (2015)
49 #------------------------------------------------------------------------------
50 # run from third-party directory only
51 cd ${0%/*} || exit 1
53 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
54 echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
55 echo " The environment variables are inconsistent with the installation."
56 echo " Check the foam-extend entries in your dot-files and source them."
57 exit 1
59 . tools/makeThirdPartyFunctionsForRPM
60 #------------------------------------------------------------------------------
62 echo ========================================
63 echo Starting ThirdParty AllMake: Stage2
64 echo ========================================
65 echo
67 if [ "$WM_MPLIB" != "SYSTEMOPENMPI" ]
68 then
69 # MPI
71 # openmpi 1.4.1
73 [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_141" ] && {
74 echo "Building openmpi 1.4.1"
75 ( rpm_make -p openmpi-1.4.1 -s openmpi-1.4.1.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz )
78 # openmpi 1.4.3
80 [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_143" ] && {
81 echo "Building openmpi 1.4.3"
82 ( rpm_make -p openmpi-1.4.3 -s openmpi-1.4.3.spec -u http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.gz )
85 # openmpi 1.5
87 [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_15" ] && {
88 echo "Building openmpi 1.5"
89 ( rpm_make -p openmpi-1.5 -s openmpi-1.5.spec -u http://www.open-mpi.org/software/ompi/v1.5/downloads/openmpi-1.5.tar.gz )
92 # openmpi 1.6.5
94 [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_165" ] && {
95 echo "Building openmpi 1.6.5"
96 ( rpm_make -p openmpi-1.6.5 -s openmpi-1.6.5.spec -u http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.gz \
97 -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_165_ConfigureAdditionalArgs"')
100 # openmpi 1.8.8
102 [ ! -z "$WM_THIRD_PARTY_USE_OPENMPI_188" ] && {
103 echo "Building openmpi 1.8.8"
104 ( rpm_make -p openmpi-1.8.8 -s openmpi-1.8.8.spec -u http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.8.tar.gz \
105 -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_OPENMPI_188_ConfigureAdditionalArgs"')
107 # mvipich2-2.2
109 [ ! -z "$WM_THIRD_PARTY_USE_MVAPICH2_22" ] && {
110 echo "Building mvapich2 2.2"
111 ( rpm_make -p mvapich2-2.2 -s mvapich2-2.2.spec -u http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2.tar.gz \
112 -f --define '_configureAdditionalArgs "$WM_THIRD_PARTY_USE_MVAPICH2_22_ConfigureAdditionalArgs"')
114 else
115 echo "Using system installed OpenMPI"
116 echo ""
118 echo ========================================
119 echo Done ThirdParty AllMake: Stage2
120 echo ========================================
121 echo
123 # ----------------------------------------------------------------- end-of-file