Skip to content

Commit c8d2430

Browse files
author
Damian Rouson
authored
Merge pull request #294 from sourceryinstitute/event-post-regression
Add event post regression test for OpenCoarrays built by GCC 7
2 parents f1fb525 + 2870675 commit c8d2430

File tree

9 files changed

+64
-5
lines changed

9 files changed

+64
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ if(opencoarrays_aware_compiler)
399399
add_mpi_test(hello_multiverse 2 ${tests_root}/integration/coarrayHelloWorld/hello_multiverse)
400400
add_mpi_test(coarray_burgers_pde 2 ${tests_root}/integration/pde_solvers/coarrayBurgers/coarray_burgers_pde)
401401
add_mpi_test(co_heat 2 ${tests_root}/integration/pde_solvers/coarrayHeatSimplified/co_heat)
402-
add_mpi_test(asynchronous_hello_world 2 ${tests_root}/integration/events/asynchronous_hello_world)
402+
add_mpi_test(asynchronous_hello_world 3 ${tests_root}/integration/events/asynchronous_hello_world)
403403
if ( ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64") AND ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") )
404404
if ( (NOT (DEFINED ENV{TRAVIS})) AND (NOT SKIP_ASSEMBLY_DEPS) )
405405
add_mpi_test(coarray_navier_stokes 2 ${tests_root}/integration/pde_solvers/navier-stokes/coarray_navier_stokes)
@@ -409,6 +409,7 @@ if(opencoarrays_aware_compiler)
409409

410410
# Regression tests based on reported issues
411411
add_mpi_test(convert-before-put 3 ${tests_root}/regression/reported/convert-before-put)
412+
add_mpi_test(event-post 3 ${tests_root}/regression/reported/event-post)
412413
else()
413414
add_test(co_sum_extension ${tests_root}/unit/extensions/test-co_sum-extension.sh)
414415
set_property(TEST co_sum_extension PROPERTY PASS_REGULAR_EXPRESSION "Test passed.")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
add_executable(asynchronous_hello_world async-hello.f90)
1+
add_executable(asynchronous_hello_world async-hello.F90)
22
target_link_libraries(asynchronous_hello_world OpenCoarrays)

src/tests/integration/events/async-hello.f90 renamed to src/tests/integration/events/async-hello.F90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ program main
6969
end do
7070

7171
sync all
72+
! Hardwire failure with GCC 7 (remove this preprocessor conditional after the silent failure with GCC 7 has been eliminated)
73+
#if __GNUC__ >= 7
74+
#else
7275
if (me==1) print *,"Test passed."
76+
#endif
7377

7478
end associate
7579

src/tests/regression/open/issue-290

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/tests/regression/open/issue-292

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../reported/issue-292-convert-type-before-put.f90

src/tests/regression/open/issue-293

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../reported/issue-293-silent-event-failure.F90
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
add_executable(convert-before-put issue-290-convert-type-before-put.f90)
1+
add_executable(convert-before-put issue-292-convert-type-before-put.f90)
22
target_link_libraries(convert-before-put OpenCoarrays)
3+
4+
add_executable(event-post issue-293-silent-event-failure.F90)
5+
target_link_libraries(event-post OpenCoarrays)

src/tests/regression/reported/issue-290-convert-type-before-put.f90 renamed to src/tests/regression/reported/issue-292-convert-type-before-put.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ program main
3434
!! date: 2016-12-21
3535
!! category: regression
3636
!! Test whether implicit type conversion occurs before coarray put
37-
!! OpenCoarrays issue #280
37+
!! OpenCoarrays issue #292
3838
use iso_fortran_env, only : error_unit
3939
implicit none
4040
real :: a[*]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
! BSD 3-Clause License
2+
!
3+
! Copyright (c) 2016, Sourcery Institute
4+
! All rights reserved.
5+
!
6+
! Redistribution and use in source and binary forms, with or without
7+
! modification, are permitted provided that the following conditions are met:
8+
!
9+
! * Redistributions of source code must retain the above copyright notice, this
10+
! list of conditions and the following disclaimer.
11+
!
12+
! * Redistributions in binary form must reproduce the above copyright notice,
13+
! this list of conditions and the following disclaimer in the documentation
14+
! and/or other materials provided with the distribution.
15+
!
16+
! * Neither the name of the copyright holder nor the names of its
17+
! contributors may be used to endorse or promote products derived from
18+
! this software without specific prior written permission.
19+
!
20+
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
31+
! Comments preceded by "!!" are formatted for the FORD docoumentation generator
32+
program main
33+
!! author: Damian Rouson
34+
!! date: 2016-12-22
35+
!! category: regression
36+
!! Test posting a static event_type coarray
37+
!! OpenCoarrays issue #293
38+
use iso_fortran_env, only : event_type
39+
implicit none
40+
type(event_type) :: test_post[*]
41+
42+
if (num_images()<3) error stop "exposing issue 293 requires num_images()>=3"
43+
event post(test_post)
44+
! Hardwire failure with GCC 7 (remove this preprocessor conditional after the silent failure with GCC 7 has been eliminated)
45+
#if __GNUC__ >= 7
46+
#else
47+
if (this_image()==1) print *,"Test passed."
48+
#endif
49+
50+
end program

0 commit comments

Comments
 (0)