Skip to content

Commit 3ce1979

Browse files
author
Damian Rouson
authored
Merge branch 'master' into issue-524-team_number
2 parents 9910b24 + 926a2bb commit 3ce1979

File tree

9 files changed

+22
-42
lines changed

9 files changed

+22
-42
lines changed

prerequisites/build-functions/build_and_install.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ build_and_install()
3737
export cmake_binary_installer="${download_path}/cmake-${version_to_build}-Linux-x86_64.sh"
3838
${SUDO:-} mkdir -p "$install_path"
3939
chmod u+x "${cmake_binary_installer}"
40+
if [[ ! -z "${SUDO:-}" ]]; then
41+
info "You do not have write permissions to the installation path ${install_path}"
42+
info "If you have administrative privileges, enter your password to install ${package_to_build}"
43+
fi
4044
info "Installing Cmake with the following command: "
41-
info "\"${cmake_binary_installer}\" --prefix=\"$install_path\" --exclude-subdir"
42-
"${cmake_binary_installer}" --prefix="$install_path" --exclude-subdir
45+
info "${SUDO:-} \"${cmake_binary_installer}\" --prefix=\"$install_path\" --exclude-subdir"
46+
${SUDO:-} "${cmake_binary_installer}" --prefix="$install_path" --exclude-subdir
4347

4448
else # build from source
4549

prerequisites/build-functions/set_or_print_default_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set_or_print_default_version()
2727
# See http://stackoverflow.com/questions/1494178/how-to-define-hash-tables-in-bash
2828
package_version=(
2929
"cmake:3.10.0"
30-
"gcc:8.2.0"
30+
"gcc:8.3.0"
3131
"mpich:3.2"
3232
"wget:1.16.3"
3333
"flex:2.6.0"

src/tests/unit/teams/get-communicator.f90

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
program main
3131
!! summary: Test get_commiunicator function, an OpenCoarrays-specific language extension
3232
use opencoarrays, only : get_communicator
33+
use oc_assertions_interface, only : assert
3334

3435
implicit none
3536

@@ -99,16 +100,4 @@ subroutine mpi_matches_caf(comm)
99100

100101
end subroutine
101102

102-
elemental subroutine assert(assertion,description)
103-
!! TODO: move this to a common place for all tests to use
104-
logical, intent(in) :: assertion
105-
character(len=*), intent(in) :: description
106-
integer, parameter :: max_digits=12
107-
character(len=max_digits) :: image_number
108-
if (.not.assertion) then
109-
write(image_number,*) this_image()
110-
error stop "Assertion '" // description // "' failed on image " // trim(image_number)
111-
end if
112-
end subroutine
113-
114103
end program

src/tests/unit/teams/team-number.f90

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
! BSD 3-Clause License
22
!
3-
! Copyright (c) 2018, Sourcery Institute
3+
! Copyright (c) 2018-2019, Sourcery Institute
44
! All rights reserved.
55
!
66
! Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,7 @@ program main
3131
!! summary: Test team_number intrinsic function
3232
use iso_fortran_env, only : team_type
3333
use iso_c_binding, only : c_loc
34+
use oc_assertions_interface, only : assert
3435

3536
implicit none
3637

@@ -67,18 +68,4 @@ program main
6768
sync all
6869
if (this_image()==1) print *,"Test passed."
6970

70-
contains
71-
72-
elemental subroutine assert(assertion,description)
73-
!! TODO: move this to a common place for all tests to use
74-
logical, intent(in) :: assertion
75-
character(len=*), intent(in) :: description
76-
integer, parameter :: max_digits=12
77-
character(len=max_digits) :: image_number
78-
if (.not.assertion) then
79-
write(image_number,*) this_image()
80-
error stop "Assertion " // description // "failed on image " // trim(image_number)
81-
end if
82-
end subroutine
83-
8471
end program

src/tests/unit/teams/teams_subset.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ program teams_subset
33
!!
44
!! Regression test for prior potential deadlock in change team/end team
55
use iso_fortran_env, only : team_type
6-
use assertions_interface, only : assert
6+
use oc_assertions_interface, only : assert
77
implicit none
88

99
type(team_type) team

src/tests/utilities/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU" )
3232
endif()
3333

3434
add_library( oc_test_interfaces OBJECT
35-
object_interface.f90
36-
assertions_interface.F90
35+
opencoarrays_object_interface.f90
36+
oc_assertions_interface.F90
3737
)
3838
add_library( opencoarrays_test_utilities
39-
assertions_implementation.F90
39+
oc_assertions_implementation.F90
4040
$<TARGET_OBJECTS:oc_test_interfaces>
4141
)
4242
set_target_properties(opencoarrays_test_utilities

src/tests/utilities/assertions_implementation.F90 renamed to src/tests/utilities/oc_assertions_implementation.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
submodule(assertions_interface) assertions_implementation
1+
submodule(oc_assertions_interface) oc_assertions_implementation
22
!! Define the assert procedure
33

44
implicit none
@@ -29,7 +29,7 @@
2929

3030
pure subroutine set(msg)
3131

32-
use object_interface, only : object
32+
use opencoarrays_object_interface, only : object
3333
!! import abstract type with generic binding supporting user-defined derived type output
3434

3535
character(len=:), intent(out), allocatable :: msg
@@ -67,4 +67,4 @@ pure subroutine set(msg)
6767

6868
end procedure
6969

70-
end submodule
70+
end submodule oc_assertions_implementation

src/tests/utilities/assertions_interface.F90 renamed to src/tests/utilities/oc_assertions_interface.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef USE_ASSERTIONS
22
# define USE_ASSERTIONS .false.
33
#endif
4-
module assertions_interface
4+
module oc_assertions_interface
55
!! author: Damian Rouson
66
!!
77
!! Utility for runtime checking of logical assertions.
@@ -24,15 +24,15 @@ module assertions_interface
2424
!! ----------
2525
!! Pass the optional success argument & check for false return value as an indication of assertion failure:
2626
!!
27-
!! use assertions_interface, only : assert,assertions
27+
!! use opencoarrays_assertions_interface, only : assert, assertions
2828
!! if (assertions) call assert( 2 > 1, "always true inequality", success)
2929
!! if (error_code/=0) call my_error_handler()
3030
!!
3131
!! Use case 2
3232
!! ----------
3333
!! Error-terminate if the assertion fails:
3434
!!
35-
!! use assertions_interface, only : assert,assertions
35+
!! use opencoarrays_assertions_interface, only : assert,assertions
3636
!! if (assertions) call assert( 2 > 1, "always true inequality")
3737
!!
3838
implicit none
@@ -61,4 +61,4 @@ module subroutine assert(assertion,description,diagnostic_data,success,error_mes
6161
!! Optional informational message allocated only if assertion==.false. .and. present(success)
6262
end subroutine
6363
end interface
64-
end module
64+
end module oc_assertions_interface

src/tests/utilities/object_interface.f90 renamed to src/tests/utilities/opencoarrays_object_interface.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module object_interface
1+
module opencoarrays_object_interface
22
!! Object pattern abstract type to provide a universal interface to a userd-defined derived type ouptput
33
!! capability specified in a generic binding
44
implicit none

0 commit comments

Comments
 (0)