Skip to content

Commit

Permalink
Merge branch 'macos-gcc-9-fixes' of github.com:sourceryinstitute/Open…
Browse files Browse the repository at this point in the history
…Coarrays
  • Loading branch information
zbeekman committed May 10, 2019
2 parents efdac20 + 0beb35b commit 30b4ab8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matrix:
os: osx
env:
- BUILD_TYPE="InstallScript"
GCC=8
GCC=9
OSX_PACKAGES="gcc shellcheck cmake mpich"
# cmake should be removed, but we should be installing binaries
# because building from source takes forever
Expand Down
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ set ( CMAKE_CONFIGURATION_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo"
set ( CMAKE_BUILD_TYPE "Release"
CACHE STRING "Select which configuration to build." )
set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
message( STATUS
"
============================================================
Building OpenCoarrays configuration: ${CMAKE_BUILD_TYPE}
============================================================
")

message( STATUS "Running with CMake from: ${CMAKE_COMMAND}" )
message( STATUS "Current source dir (for OpenCoarrays): ${CMAKE_CURRENT_SOURCE_DIR}")

# Add option and check environment to determine if developer tests should be run
set( _TF OFF )
Expand All @@ -52,8 +43,7 @@ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+(-rc[0-9]+)?"
OpenCoarraysVersion "${first_line}")

if((NOT (OpenCoarraysVersion MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+(-rc[0-9]+)?")) AND (EXISTS "${CMAKE_SOURCE_DIR}/.git"))
message( STATUS "Build from git repository detected")
find_package(Git)
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --abbrev=0
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
Expand Down Expand Up @@ -96,6 +86,18 @@ string(REGEX REPLACE "-rc[0-9]+$"
".0" OPENCOARRAYS_CMAKE_PROJECT_VERSION
"${OpenCoarraysVersion}")

file(READ "${CMAKE_CURRENT_LIST_DIR}/cmake/Banner.txt.in" OC_BANNER)
string(CONFIGURE "${OC_BANNER}" OC_BANNER @ONLY)
string(STRIP "${OC_BANNER}" OC_BANNER)
message(STATUS "${OC_BANNER}")

if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
message( STATUS "Build from git repository detected")
endif()

message( STATUS "Running with CMake from: ${CMAKE_COMMAND}" )
message( STATUS "Current source dir (for OpenCoarrays): ${CMAKE_CURRENT_SOURCE_DIR}")

project(opencoarrays VERSION "${OPENCOARRAYS_CMAKE_PROJECT_VERSION}" LANGUAGES C Fortran)

if(DEFINED CMAKE_BUILD_TYPE AND "${CMAKE_BUILD_TYPE}" MATCHES "[Rr][Ee][Ll]")
Expand Down
23 changes: 23 additions & 0 deletions cmake/Banner.txt.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
------------------------------------------------------------------------------- --

_/_/
_/ _/ _/_/_/ _/_/ _/_/_/
_/ _/ _/ _/ _/_/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/_/ _/_/_/ _/_/_/ _/ _/
_/
_/

_/_/_/
_/ _/_/ _/_/_/ _/ _/_/ _/ _/_/ _/_/_/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/
_/_/_/ _/_/ _/_/_/ _/ _/ _/_/_/ _/_/_/ _/_/_/
_/
_/_/
OpenCoarrays
""""""""""""
Build Type: @CMAKE_BUILD_TYPE@
Version: @full_git_describe@

-- ------------------------------------------------------------------------------ --
4 changes: 3 additions & 1 deletion src/tests/integration/pde_solvers/coarrayBurgers/main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ program main
real(real64), parameter :: nu=1.,final_time=0.6_real64,tolerance=1.E-3_real64,safety_factor=0.1_real64
real(real64) :: time=0.,dt,dx
integer, parameter :: nodes=16
procedure(initial_condition), pointer :: initial_u=>ten_sin
procedure(initial_condition), pointer :: initial_u=>null()

initial_u => ten_sin

#ifdef TAU
call TAU_PROFILE_SET_NODE(this_image()-1) ! Start TAU (Cray or GNU compiler)
Expand Down

0 comments on commit 30b4ab8

Please sign in to comment.