Skip to content

Commit 1a3d48e

Browse files
committed
Merge branch 'vehre/issue-292-type-conversion-during-communication' into issue-422-implement-by-refs
2 parents 1d181a0 + 84613b6 commit 1a3d48e

File tree

7 files changed

+119
-96
lines changed

7 files changed

+119
-96
lines changed

.travis.yml

Lines changed: 31 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -24,85 +24,78 @@ matrix:
2424
- os: osx
2525
env:
2626
- BUILD_TYPE="InstallScript"
27-
OSX_PACKAGES="gcc@6"
27+
OSX_PACKAGES="gcc@6 cmake"
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: 47 additions & 14 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})
@@ -622,7 +628,7 @@ endfunction(add_caf_test)
622628

623629
if(opencoarrays_aware_compiler)
624630
if (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER})
625-
message ( STATUS "Running Developer tests is enabled." )
631+
message ( STATUS "Running Developer tests is enabled. Some tests may fail for open issues." )
626632
endif()
627633
# Unit tests targeting each libcaf_mpi function, argument, and branch of code
628634
add_caf_test(initialize_mpi 2 initialize_mpi)
@@ -644,8 +650,30 @@ if(opencoarrays_aware_compiler)
644650
add_caf_test(async_comp_alloc_2 2 async_comp_alloc_2)
645651
add_caf_test(comp_allocated_1 2 comp_allocated_1)
646652
add_caf_test(comp_allocated_2 2 comp_allocated_2)
647-
add_caf_test(get_with_vector_index 4 get_with_vector_index)
648-
add_caf_test(send_with_vector_index 2 send_with_vector_index)
653+
endif()
654+
655+
656+
if (gfortran_compiler)
657+
if((NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
658+
add_caf_test(send_convert_nums 2 send_convert_nums)
659+
add_caf_test(sendget_convert_nums 3 sendget_convert_nums)
660+
add_caf_test(sendget_convert_char_array 3 sendget_convert_char_array)
661+
else()
662+
message( AUTHOR_WARNING "Skipping the following tests due to GFortran < 7.0.0 lack of compatibility:
663+
sendget_convert_nums.f90
664+
sendget_convert_char_array.f90
665+
send_convert_nums.f90")
666+
endif()
667+
if((NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.3.0) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
668+
if(NOT DEFINED ENV{TRAVIS})
669+
add_caf_test(send_with_vector_index 2 send_with_vector_index) # Hang times out on Travis-CI
670+
endif()
671+
add_caf_test(send_convert_char_array 2 send_convert_char_array)
672+
else()#if((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
673+
message( AUTHOR_WARNING "Skipping the following tests to GFortran < 7.3.0 lack of compatibility:
674+
send_convert_char_array.f90
675+
send_with_vector_index.f90")
676+
endif()
649677
endif()
650678

651679
# Pure get tests
@@ -660,15 +688,12 @@ if(opencoarrays_aware_compiler)
660688

661689
# Pure send tests
662690
add_caf_test(send_array 2 send_array)
663-
add_caf_test(send_convert_char_array 2 send_convert_char_array)
691+
add_caf_test(convert-before-put 3 convert-before-put)
664692

665693
# Pure sendget tests
666-
add_caf_test(sendget_convert_char_array 3 sendget_convert_char_array)
667694
add_caf_test(strided_sendget 3 strided_sendget)
668-
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.3.0))
669-
add_caf_test(sendget_convert_nums 3 sendget_convert_nums)
670-
add_caf_test(send_convert_nums 2 send_convert_nums)
671-
endif()
695+
add_caf_test(get_with_vector_index 4 get_with_vector_index)
696+
672697

673698
add_caf_test(co_sum 4 co_sum_test)
674699
add_caf_test(co_broadcast 4 co_broadcast_test)
@@ -691,7 +716,7 @@ if(opencoarrays_aware_compiler)
691716
# Integration tests verifying the use of libcaf_mpi in applications
692717
add_caf_test(hello_multiverse 2 hello_multiverse)
693718
add_caf_test(coarray_burgers_pde 2 coarray_burgers_pde)
694-
# add_caf_test(co_heat 2 co_heat)
719+
add_caf_test(co_heat 2 co_heat)
695720
add_caf_test(asynchronous_hello_world 3 asynchronous_hello_world)
696721

697722
# Regression tests based on reported issues
@@ -704,10 +729,18 @@ if(opencoarrays_aware_compiler)
704729
endif()
705730

706731
# Open GCC 7 regressions
707-
if ((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}) OR (gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)))
708-
add_caf_test(convert-before-put 3 convert-before-put)
709-
add_caf_test(put-alloc-comp 2 issue-422-send)
710-
add_caf_test(get-put-alloc-comp 3 issue-422-send-get)
732+
if ((CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}) OR
733+
(gfortran_compiler AND (
734+
(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0) OR
735+
(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.3.0)
736+
)))
737+
add_caf_test(put-allocatable-coarray-comp 2 issue-422-send)
738+
add_caf_test(get-put-allocatable-comp 3 issue-422-send-get)
739+
else()
740+
message( AUTHOR_WARNING
741+
"Skipping regressions in GFortran 7.0:
742+
put-allocatable-coarray-comp (issue-422)
743+
get-put-allocatable-comp (issue-422)")
711744
endif()
712745

713746
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)