Skip to content

Commit 811b4f4

Browse files
author
Damian Rouson
committed
Merge branch 'master' into opencoarrays-teams
2 parents bda0eae + f4b32f9 commit 811b4f4

15 files changed

+4279
-1036
lines changed

.travis.yml

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,83 +26,76 @@ matrix:
2626
- BUILD_TYPE="InstallScript"
2727
OSX_PACKAGES="gcc@6"
2828
GCC=6
29-
- os: osx
30-
env:
31-
- OSX_PACKAGES="gcc cmake"
32-
GCC=7
33-
OPENCOARRAYS_DEVELOPER=ON
3429
- &ubuntu
3530
os: linux
3631
sudo: false
3732
dist: trusty
3833
env:
3934
- GCC=6
4035
cache:
41-
apt: false
36+
apt: true
4237
directories:
4338
- "$CACHE"
4439
addons:
4540
apt:
46-
sources:
41+
sources: &linuxsrcs
4742
- ubuntu-toolchain-r-test
4843
- george-edison55-precise-backports
49-
packages:
44+
packages: &gcc6pkgs
5045
- gcc-6
5146
- gfortran-6
5247
- g++-6
5348
- binutils
5449
- cmake-data
5550
- cmake
56-
# - shellcheck
5751
-
5852
<<: *ubuntu
5953
env:
6054
- GCC=7
6155
addons:
6256
apt:
63-
sources:
64-
- ubuntu-toolchain-r-test
65-
- george-edison55-precise-backports
66-
packages:
57+
sources: *linuxsrcs
58+
packages: &gcc7pkgs
6759
- gcc-7
6860
- gfortran-7
6961
- g++-7
7062
- binutils
7163
- cmake-data
7264
- cmake
73-
# - shellcheck
7465
-
7566
<<: *ubuntu
7667
env:
7768
- BUILD_TYPE="InstallScript"
7869
GCC=6
79-
cache: false
8070
addons:
8171
apt:
82-
sources:
83-
- ubuntu-toolchain-r-test
72+
sources: *linuxsrcs
8473
packages:
8574
- gcc-6
8675
- gfortran-6
8776
- g++-6
88-
# - shellcheck
89-
allow_failures:
90-
- os: osx
77+
- &linux_allowed_failure
78+
<<: *ubuntu
9179
env:
92-
- OSX_PACKAGES="gcc cmake"
93-
GCC=7
80+
- GCC=7
9481
OPENCOARRAYS_DEVELOPER=ON
82+
addons:
83+
apt:
84+
sources: *linuxsrcs
85+
packages: *gcc7pkgs
86+
87+
allow_failures:
88+
- *linux_allowed_failure
9589

9690
before_install:
9791
- export FC=gfortran-${GCC}
9892
- export CC=gcc-${GCC}
9993
- export CXX=g++-${GCC}
10094
- export MPICH_BOT_URL_HEAD=MPICH_GCC${GCC}_BOT_URL_HEAD
10195
- |
102-
set -o errexit
10396
if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
10497
brew update > /dev/null
105-
[[ "$(brew ls --versions gpg2)" ]] || brew install gpg2
98+
brew ls --versions gpg2 >/dev/null || brew install gpg2
10699
brew outdated gpg2 || brew upgrade gpg2
107100
type -P openssl || brew install openssl
108101
fi
@@ -116,9 +109,7 @@ before_install:
116109
curl https://izaakbeekman.com/izaak.pubkey.txt | gpg --import
117110
git tag -v ${TRAVIS_TAG}
118111
fi
119-
set +o errexit
120112
- |
121-
set -o errexit
122113
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
123114
export PATH="${PATH}:${HOME}/Library/Python/2.7/bin"
124115
else
@@ -129,18 +120,16 @@ before_install:
129120
${CC} --version
130121
${CXX} --version
131122
fi
132-
set +o errexit
133123
134124
install:
135125
- |
136-
set -o errexit
137126
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
138127
brew update > /dev/null
139128
140-
[[ "$(brew ls --versions shellcheck)" ]] || brew install --force-bottle shellcheck
129+
brew ls --versions shellcheck >/dev/null || brew install --force-bottle shellcheck
141130
brew outdated shellcheck || brew upgrade --force-bottle shellcheck
142131
for pkg in ${OSX_PACKAGES}; do
143-
[[ "$(brew ls --versions ${pkg})" ]] || brew install ${pkg}
132+
brew ls --versions ${pkg} >/dev/null || brew install ${pkg} || brew link --overwrite ${pkg}
144133
brew outdated ${pkg} || brew upgrade ${pkg}
145134
done
146135
if [[ ${BUILD_TYPE} == InstallScript ]]; then # uninstall some stuff if present
@@ -150,9 +139,7 @@ install:
150139
else
151140
wget "${!MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}"
152141
brew install --force-bottle ${MPICH_BOT_URL_TAIL}
153-
if ! [[ "$(brew ls --versions mpich)" ]]; then
154-
brew install --force-bottle mpich
155-
fi
142+
brew ls --versions mpich >/dev/null || brew install --force-bottle mpich
156143
fi
157144
mpif90 --version || mpif90 -show || true
158145
mpicc --version || mpicc -show || true
@@ -181,46 +168,40 @@ install:
181168
mpicc --version
182169
cmake --version
183170
fi
184-
set +o errexit
185171
186172
script:
173+
- echo "In Travis-CI 'script' section."
187174
- |
188-
set -o errexit
189175
if [[ ${BUILD_TYPE} == InstallScript ]]; then
190176
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
191177
cd prerequisites/builds/opencoarrays/*
192-
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail 7
178+
../../../installations/cmake/*/bin/ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5}
193179
cd -
194180
else
195-
mkdir cmake-build
181+
mkdir cmake-build || echo "Cannot mkdir cmake-build"
196182
for BUILD_TYPE in ${BUILD_TYPES}; do
197183
rm -rf cmake-build/* || true
198-
cd cmake-build
199-
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ..
200-
make -j 4
201-
ctest --output-on-failure --schedule-random --repeat-until-fail 7
184+
cd cmake-build || echo 'cannot cd to cmake-build/'
185+
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" .. || echo "running cmake failed"
186+
make -j 4 || echo "running make failed"
187+
ctest --output-on-failure --schedule-random --repeat-until-fail ${NREPEAT:-5} --timeout ${TEST_TIMEOUT:-200}
202188
make install
203189
make uninstall
204190
cd ..
205191
done
206192
fi
207-
set +o errexit
208193
209194
after_script:
195+
- find . -name '*.gcno' -print
196+
- gcov-${GCC} --version
197+
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
210198
- |
211-
set -o errexit
212199
if [[ "${TRAVIS_TAG}" ]]; then
213200
if [[ "v${TRAVIS_TAG}" != "v$(sed -n '/[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}/{s/^\([^.]*\)\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)\(.*\)/\2/p;q;}' .VERSION)" ]]; then
214201
echo "ERROR: You are trying to tag a new release but have a version missmatch in \`.VERSION\`"
215202
false # throw an error
216203
fi
217204
fi
218-
set +o errexit
219-
220-
after_success:
221-
- find . -name '*.gcno' -print
222-
- gcov-${GCC} --version
223-
- bash <(curl -s https://codecov.io/bash) -x $(type -P gcov-${GCC})
224205
225206
# before_deploy:
226207
# - git archive -v --prefix "OpenCoarrays-${TRAVIS_TAG}/" -o "OpenCoarrays-${TRAVIS_TAG}.tar.gz" ${TRAVIS_TAG}
@@ -233,7 +214,6 @@ after_success:
233214
# sha256sum "OpenCoarrays-${TRAVIS_TAG}.tar.gz" >> "opencoarrays-${TRAVIS_TAG}-SHA256.txt
234215
# fi
235216
# - |
236-
# set -o errexit
237217
# openssl aes-256-cbc -K ${encrypted_ef4535c39461_key} -iv ${encrypted_ef4535c39461_iv} -in subkey-328B3A0E-secret.asc.enc -out ./subkey-328B3A0E-secret.asc -d
238218
# gpg --allow-secret-key-import --import ./subkey-328B3A0E-secret.asc && rm subkey-328B3A0E-secret.asc
239219
# rm subkey-328B3A0E-secret.* || true
@@ -252,7 +232,6 @@ after_success:
252232
# --comment 'verify with:' \
253233
# --comment '`gpg --verify opencoarrays-'"${TRAVIS_TAG}"'-SHA256.txt.asc`' \
254234
# "opencoarrays-${TRAVIS_TAG}-SHA256.txt"
255-
# set +o errexit
256235

257236
# deploy:
258237
# provider: releases

CMakeLists.txt

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ set ( CMAKE_CONFIGURATION_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo"
55
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} )
8+
message( STATUS
9+
"
10+
============================================================
11+
Building OpenCoarrays configuration: ${CMAKE_BUILD_TYPE}
12+
============================================================
13+
")
814

915
# Add option and check environment to determine if developer tests should be run
1016
if($ENV{OPENCOARRAYS_DEVELOPER})
@@ -624,7 +630,7 @@ endfunction(add_caf_test)
624630

625631
if(opencoarrays_aware_compiler)
626632
if (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER})
627-
message ( STATUS "Running Developer tests is enabled." )
633+
message ( STATUS "Running Developer tests is enabled. Some tests may fail for open issues." )
628634
endif()
629635
# Unit tests targeting each libcaf_mpi function, argument, and branch of code
630636
add_caf_test(initialize_mpi 2 initialize_mpi)
@@ -651,13 +657,46 @@ if(opencoarrays_aware_compiler)
651657
add_caf_test(get_communicator 3 ${tests_root}/unit/teams/get_communicator)
652658
endif()
653659
endif()
660+
661+
662+
if (gfortran_compiler)
663+
if((NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
664+
add_caf_test(send_convert_nums 2 send_convert_nums)
665+
add_caf_test(sendget_convert_nums 3 sendget_convert_nums)
666+
add_caf_test(sendget_convert_char_array 3 sendget_convert_char_array)
667+
else()
668+
message( AUTHOR_WARNING "Skipping the following tests due to GFortran < 7.0.0 lack of compatibility:
669+
sendget_convert_nums.f90
670+
sendget_convert_char_array.f90
671+
send_convert_nums.f90")
672+
endif()
673+
if((NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.3.0) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
674+
add_caf_test(send_convert_char_array 2 send_convert_char_array)
675+
else()#if((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
676+
message( AUTHOR_WARNING "Skipping the following tests to GFortran < 7.3.0 lack of compatibility:
677+
send_convert_char_array.f90")
678+
endif()
679+
endif()
680+
681+
# Pure get tests
654682
add_caf_test(get_array 2 get_array)
655683
add_caf_test(get_self 2 get_self)
656-
add_caf_test(send_array 2 send_array)
684+
add_caf_test(get_convert_nums 2 get_convert_nums)
685+
add_caf_test(get_convert_char_array 2 get_convert_char_array)
657686
add_caf_test(get_with_offset_1d 2 get_with_offset_1d)
658687
add_caf_test(whole_get_array 2 whole_get_array)
659688
add_caf_test(strided_get 2 strided_get)
689+
690+
# Pure send tests
691+
add_caf_test(send_array 2 send_array)
692+
add_caf_test(convert-before-put 3 convert-before-put)
693+
add_caf_test(send_with_vector_index 2 send_with_vector_index)
694+
695+
# Pure sendget tests
660696
add_caf_test(strided_sendget 3 strided_sendget)
697+
add_caf_test(get_with_vector_index 4 get_with_vector_index)
698+
699+
661700
add_caf_test(co_sum 4 co_sum_test)
662701
add_caf_test(co_broadcast 4 co_broadcast_test)
663702
add_caf_test(co_min 4 co_min_test)
@@ -693,10 +732,18 @@ if(opencoarrays_aware_compiler)
693732
endif()
694733

695734
# Open GCC 7 regressions
696-
if ((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}) OR (gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)))
697-
add_caf_test(convert-before-put 3 convert-before-put)
698-
add_caf_test(put-alloc-comp 2 issue-422-send)
699-
add_caf_test(get-put-alloc-comp 3 issue-422-send-get)
735+
if ((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}) OR
736+
(gfortran_compiler AND (
737+
(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0) OR
738+
(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.3.0)
739+
)))
740+
add_caf_test(put-allocatable-coarray-comp 2 issue-422-send)
741+
add_caf_test(get-put-allocatable-comp 3 issue-422-send-get)
742+
else()
743+
message( AUTHOR_WARNING
744+
"Skipping regressions in GFortran 7.0:
745+
put-allocatable-coarray-comp (issue-422)
746+
get-put-allocatable-comp (issue-422)")
700747
endif()
701748

702749
add_caf_test(allocatable_p2p_event_post 4 allocatable_p2p_event_post)

src/extensions/cafrun.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ usage() {
160160
echo " failed image support is present, OpenCoarrays triggers cleanup"
161161
echo " explicitly when a failed/stopped image is encountered in an"
162162
echo " image control statement without a \`stat=\` clause."
163-
ehco " --show, -s, Show the command that the wrapper will execute. You can pass"
163+
echo " --show, -s, Show the command that the wrapper will execute. You can pass"
164164
echo " this as the first argument and then the additional arguments"
165165
echo " that you're planning to pass to perform a dry run."
166166
echo ""

0 commit comments

Comments
 (0)