Skip to content

Commit 078df72

Browse files
author
Damian Rouson
authored
Merge branch 'master' into fix-trunk-install
2 parents 62affc2 + 09d6e09 commit 078df72

20 files changed

+149
-200
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ script:
166166
cd cmake-build
167167
cmake -DCMAKE_INSTALL_PREFIX:PATH="$HOME/OpenCoarrays" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ..
168168
make -j 4
169-
ctest --verbose
169+
ctest --output-on-failure
170170
make install
171171
cd ..
172172
fi

CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set ( CMAKE_BUILD_TYPE "Release"
77
set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
88

99
#Name project and specify source languages
10-
project(opencoarrays VERSION 1.7.3 LANGUAGES C Fortran)
10+
project(opencoarrays VERSION 1.7.5 LANGUAGES C Fortran)
1111

1212
#Print an error message on an attempt to build inside the source directory tree:
1313
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
@@ -148,9 +148,12 @@ configure_file ( "${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake.in" "${CMAKE_BINARY_
148148
add_custom_target ( uninstall
149149
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/uninstall.cmake" )
150150

151-
152151
enable_testing()
153152

153+
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
154+
# See JSON-Fortran's CMakeLists.txt file to find out how to get the check target to depend
155+
# on the test executables
156+
154157
# Determine if we're using Open MPI
155158
execute_process(COMMAND ${MPIEXEC} --version
156159
OUTPUT_VARIABLE mpi_version_out)
@@ -190,6 +193,7 @@ if(opencoarrays_aware_compiler)
190193
add_mpi_test(allocate_as_barrier 2 ${tests_root}/unit/init_register/allocate_as_barrier)
191194
add_mpi_test(allocate_as_barrier_proc 32 ${tests_root}/unit/init_register/allocate_as_barrier_proc)
192195
add_mpi_test(get_array 2 ${tests_root}/unit/send-get/get_array)
196+
add_mpi_test(get_self 2 ${tests_root}/unit/send-get/get_self)
193197
add_mpi_test(send_array 2 ${tests_root}/unit/send-get/send_array)
194198
add_mpi_test(get_with_offset_1d 2 ${tests_root}/unit/send-get/get_with_offset_1d)
195199
add_mpi_test(whole_get_array 2 ${tests_root}/unit/send-get/whole_get_array)
@@ -200,17 +204,21 @@ if(opencoarrays_aware_compiler)
200204
add_mpi_test(co_max 4 ${tests_root}/unit/collectives/co_max_test)
201205
add_mpi_test(syncall 32 ${tests_root}/unit/sync/syncall)
202206
add_mpi_test(syncimages 32 ${tests_root}/unit/sync/syncimages)
207+
add_mpi_test(syncimages2 32 ${tests_root}/unit/sync/syncimages2)
203208
add_mpi_test(duplicate_syncimages 8 ${tests_root}/unit/sync/duplicate_syncimages)
204209
add_mpi_test(co_reduce 4 ${tests_root}/unit/collectives/co_reduce_test)
205210
add_mpi_test(syncimages_status 32 ${tests_root}/unit/sync/syncimages_status)
211+
add_mpi_test(simpleatomics 32 ${tests_root}/unit/simple/atomics)
212+
# possible logic error in the following test
213+
# add_mpi_test(increment_my_neighbor 32 ${tests_root}/unit/simple/increment_my_neighbor)
206214

207215
# Integration tests verifying the use of libcaf_mpi in applications
208216
add_mpi_test(hello_multiverse 2 ${tests_root}/integration/coarrayHelloWorld/hello_multiverse)
209217
add_mpi_test(coarray_burgers_pde 2 ${tests_root}/integration/pde_solvers/coarrayBurgers/coarray_burgers_pde)
210218
add_mpi_test(co_heat 2 ${tests_root}/integration/pde_solvers/coarrayHeatSimplified/co_heat)
211219
add_mpi_test(asynchronous_hello_world 2 ${tests_root}/integration/events/asynchronous_hello_world)
212220
if ( ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64") AND ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") )
213-
if ( NOT (DEFINED ENV{TRAVIS}))
221+
if ( (NOT (DEFINED ENV{TRAVIS})) AND (NOT SKIP_ASSEMBLY_DEPS) )
214222
add_mpi_test(coarray_navier_stokes 2 ${tests_root}/integration/pde_solvers/navier-stokes/coarray_navier_stokes)
215223
set_property(TEST coarray_navier_stokes PROPERTY PASS_REGULAR_EXPRESSION "Test passed.")
216224
endif()

LICENSE

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
1-
OpenCoarrays
1+
BSD 3-Clause License
22

3-
-- A Coarray Fortran application binary interface, application programmer
4-
interface, and compiler wrapper.
5-
6-
Copyright (c) 2015-2016, Sourcery Institute
7-
Copyright (c) 2015-2016, Sourcery, Inc.
3+
Copyright (c) 2016, Sourcery Institute
84
All rights reserved.
95

106
Redistribution and use in source and binary forms, with or without
11-
modification, are permitted provided that the following conditions are
12-
met:
7+
modification, are permitted provided that the following conditions are met:
138

14-
1. Redistributions of source code must retain the above copyright
15-
notice, this list of conditions and the following disclaimer.
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
1611

17-
2. Redistributions in binary form must reproduce the above copyright
18-
notice, this list of conditions and the following disclaimer in the
19-
documentation and/or other materials provided with the distribution.
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.
2015

21-
3. Neither the name of the copyright holder nor the names of its
22-
contributors may be used to endorse or promote products derived from
23-
this software without specific prior written permission.
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.
2419

25-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29-
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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
3529
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

src/libcaf.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,16 @@ void PREFIX(sendget_by_ref) (caf_token_t dst_token, int dst_image_index,
233233
bool may_require_tmp, int *dst_stat, int *src_stat);
234234
#endif
235235

236+
void PREFIX (co_broadcast) (gfc_descriptor_t *, int, int *, char *, int);
236237
void PREFIX (co_max) (gfc_descriptor_t *, int, int *, char *, int, int);
237238
void PREFIX (co_min) (gfc_descriptor_t *, int, int *, char *, int, int);
239+
void PREFIX (co_reduce) (gfc_descriptor_t *, void *(*opr) (void *, void *),
240+
int, int, int *, char *, int , int);
238241
void PREFIX (co_sum) (gfc_descriptor_t *, int, int *, char *, int);
239242

240243
void PREFIX (sync_all) (int *, char *, int);
241244
void PREFIX (sync_images) (int, int[], int *, char *, int);
245+
void PREFIX (sync_memory) (int *, char *, int);
242246

243247
void PREFIX (error_stop_str) (const char *, int32_t)
244248
__attribute__ ((noreturn));

src/mpi/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ endif()
1717

1818
add_library(caf_mpi mpi_caf.c ../common/caf_auxiliary.c ../extensions/opencoarrays.F90)
1919

20+
set_target_properties ( caf_mpi
21+
PROPERTIES
22+
SOVERSION ${PROJECT_VERSION.MAJOR}.${PROJECT_VERSION.MINOR}
23+
VERSION ${PROJECT_VERSION}
24+
)
25+
26+
2027
target_include_directories(caf_mpi PRIVATE ${MPI_C_INCLUDE_PATH})
2128
if (gfortran_compiler)
2229
target_compile_options(caf_mpi INTERFACE -fcoarray=lib)
@@ -26,6 +33,7 @@ include_directories(${CMAKE_BINARY_DIR}/mod)
2633

2734
install(TARGETS caf_mpi EXPORT OpenCoarraysTargets
2835
ARCHIVE DESTINATION lib
36+
LIBRARY DESTINATION lib
2937
)
3038
install(DIRECTORY ${CMAKE_BINARY_DIR}/mod DESTINATION .)
3139

src/tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
22
option(HIGH_RESOLUTION_TIMER "use the walltime.o wallclock timer" FALSE)
33
option(LEGACY_ARCHITECTURE "use the SSE-enabled FFT library" FALSE)
4+
5+
# Let package maintainers disable fft library written in assembly
6+
option ( SKIP_ASSEMBLY_DEPS "Skip buidling/running tests that depend on files written in assembly" FALSE )
47
endif()
58

69
if (HIGH_RESOLUTION_TIMER)

src/tests/integration/pde_solvers/navier-stokes/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# checking whether the machine is of type 64-bit before proceeding further
22
if ( ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64") AND ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") )
33
# Default to older SSE-instruction-based FFT library
4-
if (NOT (DEFINED ENV{TRAVIS}))
4+
if (NOT (DEFINED ENV{TRAVIS}) AND (NOT SKIP_ASSEMBLY_DEPS) )
55
if (LEGACY_ARCHITECTURE OR (NOT DEFINED(LEGACY_ARCHITECTURE)))
66
set(fft_library ${CMAKE_CURRENT_SOURCE_DIR}/libfft_sse.a )
77
else()

src/tests/unit/send-get/get_array_test.f90

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ program main
1414
call one(0, -11)
1515

1616
! Static coarrays
17-
! call two()
18-
! call three()
17+
call two()
18+
call three()
1919
write(*,*) 'Test passed'
2020
contains
2121
subroutine one(lb1, lb2)
@@ -42,7 +42,7 @@ subroutine one(lb1, lb2)
4242
end if
4343
sync all
4444
if(this_image()==1) then
45-
if(any (a /= c)) call abort()
45+
if(any (a /= c)) error stop "ARRAY = SCALAR failed in get_array_test"
4646
endif
4747

4848
! Whole array: ARRAY = ARRAY
@@ -59,7 +59,7 @@ subroutine one(lb1, lb2)
5959
print *, a
6060
print *, c
6161
! FIXME: Without the print lines above, it always fails. Why?
62-
call abort()
62+
error stop "ARRAY = ARRAY failed in get_array_test"
6363
end if
6464
endif
6565

@@ -98,7 +98,7 @@ subroutine one(lb1, lb2)
9898
print *, this_image(), ': ', a
9999
print *, this_image(), ': ', c
100100
! FIXME: Without the print lines above, it always fails. Why?
101-
call abort()
101+
error stop "scalar assignment failed in get_array_test"
102102
end if
103103
endif
104104
! Array sections with different ranges and pos/neg strides
@@ -130,7 +130,7 @@ subroutine one(lb1, lb2)
130130
print *, a
131131
print *, c
132132
print *, a-c
133-
call abort()
133+
error stop "array sections with ranges and strides failed in get_array_test"
134134
endif
135135
end if
136136
! ARRAY = ARRAY
@@ -155,7 +155,7 @@ subroutine one(lb1, lb2)
155155
print *, a
156156
print *, c
157157
print *, a-c
158-
call abort()
158+
error stop "array sections with ranges and strides failed in get_array_test"
159159
endif
160160
end if
161161
end do
@@ -189,7 +189,7 @@ subroutine two()
189189
sync all
190190
if (this_image() == num_images()) then
191191
if (any (a /= caf)) &
192-
call abort()
192+
error stop "Array = scalar failed in subroutine two get_array_test"
193193
end if
194194

195195
! Whole array: ARRAY = ARRAY
@@ -203,7 +203,7 @@ subroutine two()
203203
sync all
204204
if (this_image() == num_images()) then
205205
if (any (a /= caf)) &
206-
call abort()
206+
error stop "Array = array failed in subroutine two get_array_test"
207207
end if
208208

209209
! Scalar assignment
@@ -235,7 +235,7 @@ subroutine two()
235235
sync all
236236
if (this_image() == num_images()) then
237237
if (any (a /= caf)) &
238-
call abort()
238+
error stop "scalar assignment failed in subroutine two get_array_test"
239239
end if
240240

241241
! Array sections with different ranges and pos/neg strides
@@ -280,7 +280,7 @@ subroutine two()
280280
print *, a
281281
print *, caf
282282
print *, a-caf
283-
call abort()
283+
error stop "arrays with ranges and strides failed sub. two get_array_test failed"
284284
endif
285285
end if
286286
end do
@@ -314,7 +314,7 @@ subroutine three()
314314
sync all
315315
if (this_image() == num_images()) then
316316
if (any (a /= caf)) &
317-
call abort()
317+
error stop "Array = scalar subroutine three get_array_test failed"
318318
end if
319319

320320
! Whole array: ARRAY = ARRAY
@@ -328,7 +328,7 @@ subroutine three()
328328
sync all
329329
if (this_image() == num_images()) then
330330
if (any (a /= caf)) &
331-
call abort()
331+
error stop "Array = array subroutine three get_array_test failed"
332332
end if
333333

334334
! Scalar assignment
@@ -360,7 +360,7 @@ subroutine three()
360360
sync all
361361
if (this_image() == num_images()) then
362362
if (any (a /= caf)) &
363-
call abort()
363+
error stop "scalar assignment subroutine three get_array_test failed"
364364
end if
365365

366366
! Array sections with different ranges and pos/neg strides
@@ -405,7 +405,7 @@ subroutine three()
405405
print *, a
406406
print *, caf
407407
print *, a-caf
408-
call abort()
408+
error stop "range stride in subroutine three get_array_test failed"
409409
endif
410410
end if
411411
end do

src/tests/unit/send-get/get_with_offset_1d.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ program get_offset_1d
2323

2424
if(me == 1) then
2525
do i=1,10
26-
if(b(i) /= 20+i+me+1) call abort()
26+
if(b(i) /= 20+i+me+1) error stop "get offset 1d failed"
2727
enddo
28-
write(*,*) 'Test passed.'
2928
endif
30-
sync all
29+
sync all
30+
if(me ==1) write(*,*) 'Test passed.'
3131
end program

src/tests/unit/send-get/old_get_array_test.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ subroutine one(lb1, lb2)
4545
if (any (a /= b(lb1,lb2))) then
4646
! FIXME: ABORTS UNLESS THERE IS SOME OTHER CODE
4747
print *, 'HELLO!!!!!!!!!!!!!!!!!'
48-
call abort()
48+
error stop
4949
end if
5050
end if
5151

@@ -63,7 +63,7 @@ subroutine one(lb1, lb2)
6363
print *, a
6464
print *, b
6565
print *, 'WRONG:', any (a /= b)
66-
call abort()
66+
error stop
6767
end if
6868
end if
6969

@@ -114,7 +114,7 @@ subroutine one(lb1, lb2)
114114
! print *, a
115115
! print *, caf
116116
! print *, a-caf
117-
! call abort()
117+
! error stop
118118
! endif
119119
end if
120120
end do
@@ -152,7 +152,7 @@ subroutine two()
152152
sync all
153153
if (this_image() == 1) then
154154
if (any (a /= b)) &
155-
call abort()
155+
error stop
156156
end if
157157

158158
! Whole array: ARRAY = ARRAY
@@ -170,7 +170,7 @@ subroutine two()
170170
sync all
171171
if (this_image() == 1) then
172172
if (any (a /= b)) &
173-
call abort()
173+
error stop
174174
end if
175175

176176
! Array sections with different ranges and pos/neg strides
@@ -221,7 +221,7 @@ subroutine two()
221221
! print *, a
222222
! print *, caf
223223
! print *, a-caf
224-
! call abort()
224+
! error stop
225225
! endif
226226
end if
227227
end do
@@ -259,7 +259,7 @@ subroutine three()
259259
sync all
260260
if (this_image() == 1) then
261261
if (any (a /= b)) &
262-
call abort()
262+
error stop
263263
end if
264264

265265
! Whole array: ARRAY = ARRAY
@@ -277,7 +277,7 @@ subroutine three()
277277
sync all
278278
if (this_image() == 1) then
279279
if (any (a /= b)) &
280-
call abort()
280+
error stop
281281
end if
282282

283283
! Array sections with different ranges and pos/neg strides
@@ -329,7 +329,7 @@ subroutine three()
329329
! print *, a
330330
! print *, caf
331331
! print *, a-caf
332-
! call abort()
332+
! error stop
333333
! endif
334334
end if
335335
end do

0 commit comments

Comments
 (0)