forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckin-test-mac-laptop-clang-3.5
executable file
·212 lines (201 loc) · 7.92 KB
/
checkin-test-mac-laptop-clang-3.5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#!/bin/bash
#
# Trilinos 11.14 check-in test script for a Mac laptop with minimal
# installed software. The point of this script is to get a Trilinos
# build running as quickly as possible, without needing to build or
# install heavyweight components like GCC compilers or MacPorts.
#
# Compilers: Clang 3.5 (stock, installed via Xcode). No Fortran.
# MPI: OpenMPI 1.8.3, built and installed manually using Clang 3.5.
# Build options:
#
# - C++11 enabled
# - Extra build flags for warnings (-Wall --pedantic)
# - Explicitly turn off QT and SWIG (configuration breaks otherwise;
# not required for Linux builds and not even for all Mac builds)
#
# Paths to Trilinos source, compilers, and run-time libraries.
# CHANGE THIS AS APPROPRIATE FOR YOUR COMPUTER.
#
# Tell this script where to find the Trilinos source directory.
TRILINOS_PATH=$HOME/Trilinos/Trilinos
# Tell this script where to find C++ (CXX) and C (CC) compilers. We
# use the Clang (C) and Clang++ (C++) compilers that Xcode installs.
COMPILER_BASE=/usr
CXX=${COMPILER_BASE}/bin/clang++
CC=${COMPILER_BASE}/bin/clang
# Tell this script where to find the MPI installation. We used the
# above Clang compilers to build OpenMPI 1.8.3, and we installed it in
# our home directory.
MPI_BASE_DIR=${HOME}/pkg/openmpi-1.8.3
# Gather extra arguments passed to this script on the command line.
EXTRA_ARGS=$@
#
# Configuration options for all builds
#
# All check-in test builds read options from the COMMON.config file.
# You could create this file yourself, but to simplify matters, this
# script creates it automatically.
#
echo "
-D BUILD_SHARED_LIBS:BOOL=ON
-D Trilinos_ENABLE_Fortran:BOOL=OFF
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON
-D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF
-D Teuchos_ENABLE_DEBUG_RCP_NODE_TRACING:BOOL=OFF
-D TPL_ENABLE_QT:BOOL=OFF
-D TPL_ENABLE_SWIG:BOOL=OFF
-D Trilinos_ENABLE_CXX11:BOOL=ON
-D CMAKE_CXX_FLAGS:STRING=\"-std=c++11 -Wall --pedantic\"
" > COMMON.config
# Packages like MueLu prefer to use third-party sparse direct
# factorizations. If you install a package like Cholmod or SuperLU,
# add the appropriate set of lines to the above COMMON.config list.
# Neither of these packages require linking against the MPI compiler
# wrappers, so you may use the same installation for both MPI and
# "serial" (no MPI) builds.
#
#-D TPL_ENABLE_SuperLU:BOOL=OFF
# -D SuperLU_INCLUDE_DIRS:FILEPATH=\"$HOME/pkg/superlu-4.3-clang-3.5/include\"
# -D SuperLU_LIBRARY_DIRS:FILEPATH=\"$HOME/pkg/superlu-4.3-clang-3.5/lib\"
#-D TPL_ENABLE_Cholmod:BOOL=OFF
# -D Cholmod_INCLUDE_DIRS:FILEPATH=\"$HOME/pkg/SuiteSparse-4.2.1-clang-3.5/include\"
# -D Cholmod_LIBRARY_DIRS:FILEPATH=\"$HOME/pkg/SuiteSparse-4.2.1-clang-3.5/lib\"
#
# Configuration options for MPI_DEBUG build
#
# When running the check-in test script, if no builds are specified,
# the MPI_DEBUG and SERIAL_RELEASE builds are enabled by default.
# MPI_DEBUG reads configuration options first from COMMON.config (see
# above), and then from MPI_DEBUG.config (generated below).
#
# A build gets built in the appropriately named subdirectory of this
# one, the CHECKIN subdirectory of Trilinos. For example, the
# MPI_DEBUG build gets built in the MPI_DEBUG/ subdirectory.
#
# We categorize builds on two axes:
#
# 1. Is MPI enabled? (If not, we call the build "serial")
# 2. Debug or release?
#
# For MPI builds, it may be necessary to tell CMake where to find MPI
# components. One must usually specify at least the MPI_BASE_DIR
# variable. This tells CMake the "base directory" where the MPI
# implementation was installed. We recommend not specifying any MPI_*
# variables unless MPI was installed somewhere other than the usual
# system location (which is the case here). If that doesn't work, try
# MPI_BASE_DIR first, then add variables until things start working.
#
echo "
-D CMAKE_BUILD_TYPE:STRING=DEBUG
-D Teuchos_ENABLE_DEBUG:BOOL=ON
-D TPL_ENABLE_MPI:BOOL=ON
-D MPI_BASE_DIR:FILEPATH=\"${MPI_BASE_DIR}\"
-D MPI_EXEC:FILEPATH=\"${MPI_BASE_DIR}/bin/mpiexec\"
-D MPI_CXX_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicxx\"
-D MPI_C_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicc\"
" > MPI_DEBUG.config
#
# Configuration options for MPI debug build with
# Scalar={double,float,std::complex<double>} enabled.
#
# This is not one of the default builds. In order to enable it, pass
# the build name MPI_DEBUG_COMPLEX as one of the arguments to the
# "--extra-builds" command-line option of this script. Trilinos
# handles this automatically; your script does not need to parse
# command-line arguments. In general, build $BUILD reads
# configuration options first from COMMON.config, and then from
# $BUILD.config.
#
echo "
-D CMAKE_BUILD_TYPE:STRING=DEBUG
-D Teuchos_ENABLE_DEBUG:BOOL=ON
-D Teuchos_ENABLE_COMPLEX:BOOL=ON
-D TPL_ENABLE_MPI:BOOL=ON
-D MPI_BASE_DIR:FILEPATH=\"${MPI_BASE_DIR}\"
-D MPI_EXEC:FILEPATH=\"${MPI_BASE_DIR}/bin/mpiexec\"
-D MPI_CXX_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicxx\"
-D MPI_C_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicc\"
-D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON
-D Kokkos_ENABLE_DEBUG:BOOL=ON
-D Kokkos_ENABLE_Serial:BOOL=OFF
-D Kokkos_ENABLE_OpenMP:BOOL=OFF
-D Kokkos_ENABLE_Pthread:BOOL=ON
-D KokkosClassic_DefaultNode:STRING=\"Kokkos::Compat::KokkosThreadsWrapperNode\"
-D Tpetra_INST_FLOAT:BOOL=ON
-D Tpetra_INST_COMPLEX_FLOAT:BOOL=OFF
-D Tpetra_INST_COMPLEX_DOUBLE:BOOL=ON
" > MPI_DEBUG_COMPLEX.config
#
# Configuration options for MPI release build. This is also not one
# of the default builds, so in order to enable it, you must pass
# MPI_RELEASE as one of the arguments to "--extra-builds". For
# example: "--extra-builds=MPI_DEBUG_COMPLEX,MPI_RELEASE" enables both
# the MPI_DEBUG_COMPLEX (see above) and MPI_RELEASE (below) builds.
#
echo "
-D CMAKE_BUILD_TYPE:STRING=RELEASE
-D TPL_ENABLE_MPI:BOOL=ON
-D MPI_BASE_DIR:FILEPATH=\"${MPI_BASE_DIR}\"
-D MPI_EXEC:FILEPATH=\"${MPI_BASE_DIR}/bin/mpiexec\"
-D MPI_CXX_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicxx\"
-D MPI_C_COMPILER:FILEPATH=\"${MPI_BASE_DIR}/bin/mpicc\"
" > MPI_RELEASE.config
#
# Configuration options for serial release build
#
# This is one of the default builds; it is used unless the
# --default-builds=... command-line argument does not include it.
# "Serial" means "no MPI" in this context; it has nothing to do with
# thread-level parallelism. The default builds include MPI_DEBUG and
# SERIAL_RELEASE, in order to cover both the (MPI, no MPI) and (debug,
# release) axes with minimal replication.
#
echo "
-D CMAKE_BUILD_TYPE:STRING=RELEASE
-D CMAKE_CXX_COMPILER:FILEPATH=\"${CXX}\"
-D CMAKE_C_COMPILER:FILEPATH=\"${CC}\"
" > SERIAL_RELEASE.config
#
# Configuration options for serial debug build
#
# This is NOT one of the default builds.
#
echo "
-D CMAKE_BUILD_TYPE:STRING=DEBUG
-D Teuchos_ENABLE_DEBUG:BOOL=ON
-D CMAKE_CXX_COMPILER:FILEPATH=\"${CXX}\"
-D CMAKE_C_COMPILER:FILEPATH=\"${CC}\"
-D Kokkos_ENABLE_OpenMP:BOOL=OFF
-D Kokkos_ENABLE_Pthread:BOOL=OFF
" > SERIAL_DEBUG.config
#
# Invoke the check-in test script.
#
# The check-in test script requires that cmake, ctest, and python be
# in the PATH. If they aren't, you will first need to modify PATH to
# put them there.
#
# You may pass the "--help" command-line argument to this script to
# get a detailed description of all command-line arguments that it
# accepts. Here is a sample:
#
# --disable-packages=...: Explicitly disable specific Trilinos
# packages (or subpackages). You may find this more useful with
# non-default builds, which enable a larger set of packages.
# Otherwise, don't do this unless you know what you are doing.
#
# --no-eg-git-version-check: Tell Trilinos not to worry if the
# installed version of git is a bit old.
#
# --ctest-timeout=180: Tell Trilinos to consider a test failed and cut
# it off if it takes longer than 180 seconds to execute.
#
# $EXTRA_ARGS: Any extra command-line arguments given to this script
# get passed directly to Trilinos' main check-in test script.
#
${TRILINOS_PATH}/checkin-test.py \
--disable-packages=FEI,STK \
--no-eg-git-version-check \
--ctest-timeout=180 \
$EXTRA_ARGS