Skip to content

Commit 9674d71

Browse files
committed
Merge branch 'master' into vehre/failed-images
2 parents 877602b + 82ccc59 commit 9674d71

File tree

19 files changed

+309
-220
lines changed

19 files changed

+309
-220
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# version, i.e., code is from SCM/git. This project uses semantic
33
# versioning. For details see http://semver.org
44

5-
1.8.7
5+
1.8.11

.pullapprove.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
---
12
version: 2
2-
extends: Default # see https://pullapprove.com/sourceryinstitute/
3+
extends: Default # see https://pullapprove.com/sourceryinstitute/
34
groups:
45
# These have all the group_defaults
56
Maintainers:
@@ -13,9 +14,9 @@ groups:
1314
- caffeinate-opencoarrays
1415
teams:
1516
- team-opencoarrays
16-
# https://github.com/orgs/sourceryinstitute/teams/team-opencoarrays
17+
# https://github.com/orgs/sourceryinstitute/teams/team-opencoarrays
1718
OpenCoarrays:
18-
# Whenever someone has a PR, on any branch require at least 1
19+
# Whenever someone has a PR, on any branch require at least 1
1920
# collaborator to explicitly review it
2021
required: 1
2122
users: all

.travis.yml

Lines changed: 103 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1+
---
12
language: generic
23

4+
os: osx
5+
36
env:
47
global:
5-
- CACHE="$HOME/.local"
8+
- CACHE="${HOME}/.local"
69
- MPICH_VER="3.2"
7-
- MPICH_URL_HEAD="http://www.mpich.org/static/downloads/$MPICH_VER"
10+
- MPICH_URL_HEAD="http://www.mpich.org/static/downloads/${MPICH_VER}"
811
- MPICH_URL_TAIL="mpich-${MPICH_VER}.tar.gz"
9-
- MPICH_DIR="$HOME/.local/usr/mpich"
10-
- MPICH_BOT_URL_HEAD="https://github.com/sourceryinstitute/opencoarrays/files/452136/"
11-
- MPICH_BOT_URL_TAIL="mpich-3.2_2.yosemite.bottle.1.tar.gz"
12-
- FC=gfortran-6
13-
- CC=gcc-6
14-
- CXX=g++-6
12+
- MPICH_DIR="${HOME}/.local/usr/mpich"
13+
- MPICH_GCC6_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/979804/"
14+
- MPICH_GCC7_BOT_URL_HEAD="https://github.com/sourceryinstitute/OpenCoarrays/files/976779/"
15+
- MPICH_BOT_URL_TAIL="mpich-3.2_3.yosemite.bottle.1.tar.gz"
16+
- BUILD_TYPES="Release Debug RelWithDebInfo CodeCoverage"
17+
matrix:
18+
- GCC=6 OSX_PACKAGES="gcc@6 cmake"
19+
- GCC=7 OSX_PACKAGES="gcc cmake"
1520

1621
matrix:
22+
fast_finish: true
1723
include:
1824
- os: osx
1925
env:
20-
- BUILD_TYPE="CodeCoverage"
21-
OSX_PACKAGES="gcc cmake"
22-
- os: osx
23-
env:
24-
- BUILD_TYPE="Release"
25-
OSX_PACKAGES="gcc cmake"
26+
- BUILD_TYPE="InstallScript"
27+
OSX_PACKAGES="gcc@6"
28+
GCC=6
2629
- os: osx
2730
env:
28-
- BUILD_TYPE="InstallScript"
29-
OSX_PACKAGES="gcc"
31+
- OSX_PACKAGES="gcc cmake"
32+
GCC=7
33+
OPENCOARRAYS_DEVELOPER=ON
3034
- &ubuntu
3135
os: linux
3236
sudo: false
3337
env:
34-
- BUILD_TYPE="CodeCoverage"
38+
- GCC=6
3539
cache:
3640
apt: false
3741
directories:
@@ -48,14 +52,27 @@ matrix:
4852
- binutils
4953
- cmake-data
5054
- cmake
51-
-
52-
<<: *ubuntu
53-
env:
54-
- BUILD_TYPE="Release"
55+
# -
56+
# <<: *ubuntu
57+
# env:
58+
# - GCC=7
59+
# addons:
60+
# apt:
61+
# sources:
62+
# - ubuntu-toolchain-r-test
63+
# - george-edison55-precise-backports
64+
# packages:
65+
# - gcc-7
66+
# - gfortran-7
67+
# - g++-7
68+
# - binutils
69+
# - cmake-data
70+
# - cmake
5571
-
5672
<<: *ubuntu
5773
env:
5874
- BUILD_TYPE="InstallScript"
75+
GCC=6
5976
cache: false
6077
addons:
6178
apt:
@@ -65,84 +82,92 @@ matrix:
6582
- gcc-6
6683
- gfortran-6
6784
- g++-6
85+
allow_failures:
86+
- os: osx
87+
env:
88+
- OSX_PACKAGES="gcc cmake"
89+
GCC=7
90+
OPENCOARRAYS_DEVELOPER=ON
6891

6992
before_install:
93+
- export FC=gfortran-${GCC}
94+
- export CC=gcc-${GCC}
95+
- export CXX=g++-${GCC}
96+
- export MPICH_BOT_URL_HEAD=MPICH_GCC${GCC}_BOT_URL_HEAD
7097
- |
7198
set -o errexit
72-
if [[ "$TRAVIS_TAG" ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]] && $TRAVIS_SECURE_ENV_VARS ; then
99+
if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
73100
brew update > /dev/null
74101
[[ "$(brew ls --versions gpg2)" ]] || brew install gpg2
75102
brew outdated gpg2 || brew upgrade gpg2
76-
which openssl || brew install openssl
103+
type -P openssl || brew install openssl
77104
fi
78-
if ! [[ "$TRAVIS_TAG" ]] || ! $TRAVIS_SECURE_ENV_VARS ; then
105+
if ! [[ "${TRAVIS_TAG}" ]] || ! ${TRAVIS_SECURE_ENV_VARS} ; then
79106
unset encrypted_ef4535c39461_key || true
80107
unset encrypted_ef4535c39461_iv || true
81108
rm subkey-328B3A0E-secret.asc{,.enc} || true
82109
83110
fi
84-
if [[ "$TRAVIS_TAG" ]] ; then
111+
if [[ "${TRAVIS_TAG}" ]] ; then
85112
curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import
86113
git tag -v ${TRAVIS_TAG}
87114
fi
88115
set +o errexit
89-
-
90-
-
91-
-
92116
- |
93117
set -o errexit
94-
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
95-
export PATH="$PATH:$HOME/Library/Python/2.7/bin"
118+
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
119+
export PATH="${PATH}:${HOME}/Library/Python/2.7/bin"
96120
else
97-
[[ -d "$CACHE/bin" ]] || mkdir -p "$CACHE/bin"
98-
[[ -d "$MPICH_DIR" ]] || mkdir -p "$MPICH_DIR"
99-
export PATH="$CACHE/bin:$PATH"
100-
$FC --version
101-
$CC --version
102-
$CXX --version
121+
[[ -d "${CACHE}/bin" ]] || mkdir -p "${CACHE}/bin"
122+
[[ -d "${MPICH_DIR}" ]] || mkdir -p "${MPICH_DIR}"
123+
export PATH="${CACHE}/bin:${PATH}"
124+
${FC} --version
125+
${CC} --version
126+
${CXX} --version
103127
fi
104128
set +o errexit
105129
106130
install:
107131
- |
108132
set -o errexit
109-
if [[ $TRAVIS ]] && [[ "X$TRAVIS_OS_NAME" = "Xosx" ]]; then
133+
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
110134
brew update > /dev/null
111135
112-
for pkg in $OSX_PACKAGES; do
113-
[[ "$(brew ls --versions $pkg)" ]] || brew install --force-bottle $pkg
114-
brew outdated $pkg || brew upgrade --force-bottle $pkg
136+
for pkg in ${OSX_PACKAGES}; do
137+
[[ "$(brew ls --versions ${pkg})" ]] || brew install --force-bottle ${pkg}
138+
brew outdated ${pkg} || brew upgrade --force-bottle ${pkg}
115139
done
116-
if ! [[ "$(brew ls --versions mpich)" ]] && [[ "X$BUILD_TYPE" != "XInstallScript" ]]; then
117-
wget ${MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}
140+
if [[ ${BUILD_TYPE} == InstallScript ]]; then # uninstall some stuff if present
141+
brew uninstall --force --ignore-dependencies cmake || true
142+
brew uninstall --force --ignore-dependencies mpich || true
143+
brew uninstall --force --ignore-dependencies openmpi || true
144+
else
145+
wget "${!MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}"
118146
brew install --force-bottle ${MPICH_BOT_URL_TAIL}
119147
if ! [[ "$(brew ls --versions mpich)" ]]; then
120148
brew install --force-bottle mpich
121149
fi
122-
mpif90 --version
123-
mpicc --version
124-
cmake --version
125-
elif [[ "X$BUILD_TYPE" = "XInstallScript" ]]; then # uninstall some stuff if present
126-
[[ "$(brew ls --versions cmake)" ]] && brew rm cmake || true
127-
[[ "$(brew ls --versions mpich)" ]] && brew rm mpich || true
128-
[[ "$(brew ls --versions openmpi)" ]] && brew rm openmpi || true
129150
fi
130-
elif [[ "X$BUILD_TYPE" != "XInstallScript" ]]; then # Ubuntu on Travis-CI, NOT testing install.sh
131-
if ! ( [[ -x "$HOME/.local/bin/mpif90" ]] && [[ -x "$HOME/.local/bin/mpicc" ]] ); then
151+
mpif90 --version || mpif90 -show || true
152+
mpicc --version || mpicc -show || true
153+
cmake --version || true
154+
155+
elif [[ ${BUILD_TYPE} != InstallScript ]]; then # Ubuntu on Travis-CI, NOT testing install.sh
156+
if ! [[ -x "${HOME}/.local/bin/mpif90" && -x "${HOME}/.local/bin/mpicc" ]]; then
132157
# mpich install not cached
133158
# could use prerequisites/build instead...
134159
wget "${MPICH_URL_HEAD}/${MPICH_URL_TAIL}"
135-
mv "$MPICH_URL_TAIL" "$MPICH_DIR/.."
136-
pushd "$MPICH_DIR/.."
137-
tar -xzvf "$MPICH_URL_TAIL"
160+
mv "${MPICH_URL_TAIL}" "${MPICH_DIR}/.."
161+
pushd "${MPICH_DIR}/.."
162+
tar -xzvf "${MPICH_URL_TAIL}"
138163
cd "${MPICH_URL_TAIL%.tar.gz}"
139-
./configure --prefix="$MPICH_DIR"
164+
./configure --prefix="${MPICH_DIR}"
140165
make -j 4
141166
make install
142167
popd
143-
for f in "$MPICH_DIR/bin/"*; do
144-
if [[ -x "$f" ]]; then
145-
ln -fs "$f" "$HOME/.local/bin/${f##*/}"
168+
for f in "${MPICH_DIR}/bin/"*; do
169+
if [[ -x "${f}" ]]; then
170+
ln -fs "${f}" "${HOME}/.local/bin/${f##*/}"
146171
fi
147172
done
148173
fi
@@ -155,55 +180,55 @@ install:
155180
script:
156181
- |
157182
set -o errexit
158-
if [[ "X$BUILD_TYPE" = "XInstallScript" ]]; then
159-
[[ -d "$HOME/opt" ]] || mkdir "$HOME/opt"
160-
[[ -d "$HOME/bin" ]] || mkdir "$HOME/bin"
161-
ln -fs "$(which gfortran-6)" "$HOME/bin/gfortran"
162-
ln -fs "$(which gcc-6)" "$HOME/bin/gcc"
163-
ln -fs "$(which g++-6)" "$HOME/bin/g++"
164-
export PATH="$PATH:$HOME/bin"
165-
./install.sh --yes-to-all -i "$HOME/opt/opencoarrays" -j 4 -f "$HOME/bin/gfortran" -c "$HOME/bin/gcc" -C "$HOME/bin/g++"
183+
if [[ ${BUILD_TYPE} == InstallScript ]]; then
184+
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
166185
cd prerequisites/builds/opencoarrays/*
167186
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail 7
168187
cd -
169188
else
170189
mkdir cmake-build
171-
cd cmake-build
172-
cmake -DCMAKE_INSTALL_PREFIX:PATH="$HOME/OpenCoarrays" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ..
173-
make -j 4
174-
ctest --output-on-failure --schedule-random --repeat-until-fail 7
175-
make install
176-
cd ..
190+
for BUILD_TYPE in ${BUILD_TYPES}; do
191+
rm -rf cmake-build/* || true
192+
cd cmake-build
193+
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ..
194+
make -j 4
195+
ctest --output-on-failure --schedule-random --repeat-until-fail 7
196+
make install
197+
make uninstall
198+
cd ..
199+
done
177200
fi
178201
set +o errexit
179202
180203
after_script:
181204
- |
182-
if [ "$TRAVIS_TAG" ]; then
183-
if [[ "v$TRAVIS_TAG" != "v$(sed -n 's/\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)/\1/p' .VERSION)" ]]; then
205+
set -o errexit
206+
if [[ "${TRAVIS_TAG}" ]]; then
207+
if [[ "v${TRAVIS_TAG}" != "v$(sed -n 's/\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)/\1/p' .VERSION)" ]]; then
184208
echo "ERROR: You are trying to tag a new release but have a version missmatch in \`.VERSION\`"
185209
false # throw an error
186210
fi
187211
fi
212+
set +o errexit
188213
189214
after_success:
190215
- find . -name '*.gcno' -print
191-
- gcov-6 --version
192-
- bash <(curl -s https://codecov.io/bash) -x $(which gcov-6)
216+
- gcov-${GCC} --version
217+
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
193218

194219
# before_deploy:
195220
# - git archive -v --prefix "OpenCoarrays-${TRAVIS_TAG}/" -o "OpenCoarrays-${TRAVIS_TAG}.tar.gz" ${TRAVIS_TAG}
196221
# - |
197222
# echo '# To verify cryptographic checksums `shasum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Mac OS X,' > "opencoarrays-${TRAVIS_TAG}-SHA256.txt
198223
# echo '# `sha256sum -c opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt` on Linux.' >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
199-
# if [[ "X$(uname -s)" == "XDarwin" ]]; then
224+
# if [[ $(uname -s) == Darwin ]]; then
200225
# shasum -a 256 "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
201226
# else
202227
# sha256sum "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
203228
# fi
204229
# - |
205230
# set -o errexit
206-
# openssl aes-256-cbc -K $encrypted_ef4535c39461_key -iv $encrypted_ef4535c39461_iv -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
231+
# openssl aes-256-cbc -K ${encrypted_ef4535c39461_key} -iv ${encrypted_ef4535c39461_iv} -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
207232
# gpg --allow-secret-key-import --import ./subkey-328B3A0E-secret.asc && rm subkey-328B3A0E-secret.asc
208233
# rm subkey-328B3A0E-secret.* || true
209234
# unset encrypted_ef4535c39461_key || true

CMakeLists.txt

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ set ( CMAKE_BUILD_TYPE "Release"
66
CACHE STRING "Select which configuration to build." )
77
set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
88

9+
# Add option and check environment to determine if developer tests should be run
10+
if($ENV{OPENCOARRAYS_DEVELOPER})
11+
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" ON)
12+
else()
13+
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" OFF)
14+
endif()
15+
mark_as_advanced(RUN_DEVELOPER_TESTS)
16+
917
# Name project and specify source languages
1018
# Parse version from .VERSION file so that more info can be added and easier to get from scripts
1119
file( STRINGS ".VERSION" OpenCoarraysVersion
@@ -156,8 +164,15 @@ endif()
156164
find_package( MPI )
157165

158166
if ( (NOT MPI_C_FOUND) OR (NOT MPI_Fortran_FOUND) OR (NOT MPIEXEC))
167+
# Get default install location of MPICH from install.sh
168+
execute_process( COMMAND "./install.sh" -P mpich
169+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
170+
OUTPUT_VARIABLE DEFAULT_MPICH_INSTALL_LOC
171+
OUTPUT_QUIET
172+
OUTPUT_STRIP_TRAILING_WHITES_SPACE
173+
)
159174
find_program (MY_MPI_EXEC NAMES mpirun mpiexec lamexec srun
160-
PATHS "${CMAKE_SOURCE_DIR/prerequisites/installations/mpich/3.1.4}" "${CMAKE_SOURCE_DIR}/prerequisites/installations/mpich/*" ENV PATH
175+
PATHS "${DEFAULT_MPICH_INSTALL_LOC}" ENV PATH
161176
HINTS "${FTN_COMPILER_DIR}" "${C_COMPILER_DIR}"
162177
PATH_SUFFIXES bin)
163178
set ( MPI_HOME "${MPI_HOME}" "${MY_MPI_EXEC}" "${MY_MPI_EXEC}/.." )
@@ -479,10 +494,13 @@ if(opencoarrays_aware_compiler)
479494
add_mpi_test(register_alloc_comp_1 2 ${tests_root}/unit/init_register/register_alloc_comp_1)
480495
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
481496
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
482-
add_mpi_test(async_comp_alloc 6 ${tests_root}/unit/init_register/async_comp_alloc)
483-
# Timeout async_comp_alloc test after 3 seconds to progess past the known failure
484-
set_property(TEST async_comp_alloc PROPERTY TIMEOUT_AFTER_MATCH 3 "known failure")
485-
set_property(TEST async_comp_alloc PROPERTY TIMEOUT 6) # in the event old CMake is being used
497+
if (RUN_DEVELOPER_TESTS)
498+
message ( STATUS "Running Developer tests is enabled." )
499+
add_mpi_test(async_comp_alloc 6 ${tests_root}/unit/init_register/async_comp_alloc)
500+
# Timeout async_comp_alloc test after 3 seconds to progess past the known failure
501+
set_property(TEST async_comp_alloc PROPERTY TIMEOUT_AFTER_MATCH 3 "known failure")
502+
set_property(TEST async_comp_alloc PROPERTY TIMEOUT 6) # in the event old CMake is being used
503+
endif()
486504
endif()
487505
add_mpi_test(get_array 2 ${tests_root}/unit/send-get/get_array)
488506
add_mpi_test(get_self 2 ${tests_root}/unit/send-get/get_self)
@@ -519,7 +537,9 @@ if(opencoarrays_aware_compiler)
519537
# GFortran PR 78505 only fixed on trunk/gcc 7
520538
add_mpi_test(source-alloc-no-sync 8 ${tests_root}/regression/reported/source-alloc-sync)
521539
endif()
522-
add_mpi_test(convert-before-put 3 ${tests_root}/regression/reported/convert-before-put)
540+
if (RUN_DEVELOPER_TESTS)
541+
add_mpi_test(convert-before-put 3 ${tests_root}/regression/reported/convert-before-put)
542+
endif()
523543
add_mpi_test(event-post 3 ${tests_root}/regression/reported/event-post)
524544
add_mpi_test(co_reduce-factorial 4 ${tests_root}/regression/reported/co_reduce-factorial)
525545
add_mpi_test(co_reduce-factorial-int8 4 ${tests_root}/regression/reported/co_reduce-factorial-int8)

0 commit comments

Comments
 (0)