Skip to content

Commit

Permalink
Merge pull request #582 from LLNL/v0.5.1-rc
Browse files Browse the repository at this point in the history
V0.5.1 rc
  • Loading branch information
white238 authored Apr 13, 2022
2 parents 296bf64 + 583be98 commit 655aa8c
Show file tree
Hide file tree
Showing 36 changed files with 294 additions and 391 deletions.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stages:
.build_script:
script:
#Use pre-existing allocation if any
- JOBID=$(if [[ "$SYS_TYPE" == "toss_3_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- JOBID=$(if [[ $SYS_TYPE = toss_* ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi)
#BUILD + TEST
- echo -e "section_start:$(date +%s):build_and_test\r\e[0K
Expand All @@ -35,3 +35,4 @@ stages:
include:
- local: .gitlab/build_quartz.yml
- local: .gitlab/build_lassen.yml
- local: .gitlab/build_corona.yml
2 changes: 1 addition & 1 deletion .gitlab/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mkdir $BUILD_DIR
cd $BUILD_DIR

cmake -C ../host-configs/llnl/$SYS_TYPE/$HOST_CONFIG ../tests/internal
make -j8
make VERBOSE=1 -j8
ctest -DCTEST_OUTPUT_ON_FAILURE=1 --no-compress-output -T Test -VV
xsltproc -o junit.xml ../tests/ctest-to-junit.xsl Testing/*/Test.xml

Expand Down
51 changes: 51 additions & 0 deletions .gitlab/build_corona.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
####
# This is the share configuration of jobs for corona
.on_corona:
tags:
- shell
- corona
rules:
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_CORONA == "OFF"' #run except if ...
when: never
- if: '$CI_JOB_NAME =~ /corona_release/'
when: always
- when: on_success

####
# In pre-build phase, allocate a node for builds
corona_allocate:
variables:
GIT_STRATEGY: none
extends: [.on_corona]
stage: allocate
script:
- salloc -p pbatch -N 1 -t 10 --no-shell --job-name=${PROJECT_ALLOC_NAME} --mpibind=off
needs: []

####
# In post-build phase, deallocate resources
# Note : make sure this is run even on build phase failure
corona_release:
variables:
GIT_STRATEGY: none
extends: [.on_corona]
stage: release
script:
- export JOBID=$(squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A)
- if [[ -n "${JOBID}" ]]; then scancel ${JOBID}; fi

####
# Template
.build_on_corona:
stage: build
variables:
ALLOC_COMMAND: "srun -p pbatch -t 10 -N 1 ${ASSIGN_ID} --interactive"
extends: [.build_script, .on_corona]
needs: [corona_allocate]

####
# Build jobs
corona-rocm_4_5_2_hip:
variables:
HOST_CONFIG: "rocm@4.5.2_hip.cmake"
extends: [.build_on_corona]
5 changes: 3 additions & 2 deletions .gitlab/build_quartz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
rules:
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_QUARTZ == "OFF"' #run except if ...
when: never
- if: '$CI_JOB_NAME =~ /release_resources/'
- if: '$CI_JOB_NAME =~ /quartz_release/'
when: always
- when: on_success

Expand Down Expand Up @@ -39,8 +39,9 @@ quartz_release:
.build_on_quartz:
stage: build
variables:
ALLOC_COMMAND: "srun -p pdebug -t 30 -N 1 ${ASSIGN_ID} --interactive"
ALLOC_COMMAND: "srun -p pdebug -t 10 -N 1 ${ASSIGN_ID} --interactive"
extends: [.build_script, .on_quartz]
needs: [quartz_allocate]

####
# Build jobs
Expand Down
19 changes: 18 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ The project release numbers follow [Semantic Versioning](http://semver.org/spec/

## [Unreleased] - Release date yyyy-mm-dd

## [Version 0.5.1] - Release date 2022-04-22

### Added
- Added support for C++20. Note: XL does not support C++20.
While PGI has C++20 support, it is currently disabled (A BLT fatal error will occur).
- BLT_CXX_STD now sets CMAKE_HIP_STANDARD, in CMake 3.21+, similar to CMAKE_CUDA_STANDARD.

### Fixed
- Removed hard-coded -std=c++11 from various places related to CUDA flags. This now honors
CMAKE_CUDA_STANDARD if set otherwise falls back on BLT_CXX_STD or CMAKE_CXX_STANDARD.
- Removed extra HIP offload flags that were being added as generator expressions as opposed to simple
flags.

### Removed
- Removed support for deprecated HCC.

## [Version 0.5.0] - Release date 2022-03-07

### Added
Expand Down Expand Up @@ -235,7 +251,8 @@ The project release numbers follow [Semantic Versioning](http://semver.org/spec/



[Unreleased]: https://github.com/LLNL/blt/compare/v0.5.0...develop
[Unreleased]: https://github.com/LLNL/blt/compare/v0.5.1...develop
[Version 0.5.1]: https://github.com/LLNL/blt/compare/v0.5.0...v0.5.1
[Version 0.5.0]: https://github.com/LLNL/blt/compare/v0.4.1...v0.5.0
[Version 0.4.1]: https://github.com/LLNL/blt/compare/v0.4.0...v0.4.1
[Version 0.4.0]: https://github.com/LLNL/blt/compare/v0.3.6...v0.4.0
Expand Down
16 changes: 14 additions & 2 deletions SetupBLT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: (BSD-3-Clause)

if (NOT BLT_LOADED)
set(BLT_VERSION "0.5.0" CACHE STRING "")
set(BLT_VERSION "0.5.1" CACHE STRING "")
mark_as_advanced(BLT_VERSION)
message(STATUS "BLT Version: ${BLT_VERSION}")

Expand Down Expand Up @@ -33,6 +33,13 @@ if (NOT BLT_LOADED)
# Show CMake info right out of the gate
################################
message(STATUS "CMake Version: ${CMAKE_VERSION}")
get_property(_is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if (_is_multi_config)
message(STATUS "CMake Configuration Types: ${CMAKE_CONFIGURATION_TYPES}")
else()
message(STATUS "CMake Build Type: ${CMAKE_BUILD_TYPE}")
endif()
unset(_is_multi_config)

if(${CMAKE_VERSION} VERSION_LESS 3.8.0)
message("*************************************")
Expand Down Expand Up @@ -95,7 +102,6 @@ if (NOT BLT_LOADED)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()


################################
# Enable cmake compilation database feature
################################
Expand All @@ -106,6 +112,11 @@ if (NOT BLT_LOADED)
################################
include(${BLT_ROOT_DIR}/cmake/BLTMacros.cmake)

################################
# Setup compiler standards early
################################
include(${BLT_ROOT_DIR}/cmake/SetupCompilerStandards.cmake)

################################
# Standard TPL support
################################
Expand Down Expand Up @@ -212,3 +223,4 @@ if (NOT BLT_LOADED)
endif()

endif() # only load BLT once!

3 changes: 1 addition & 2 deletions cmake/BLTMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ endmacro(blt_add_benchmark)
## DEFAULT defaultFlag (optional)
## GNU gnuFlag (optional)
## CLANG clangFlag (optional)
## HCC hccFlag (optional)
## INTEL intelFlag (optional)
## INTELLLVM intelLLVMFlag (optional)
## XL xlFlag (optional)
Expand All @@ -972,7 +971,7 @@ endmacro(blt_add_benchmark)
macro(blt_append_custom_compiler_flag)

set(options)
set(singleValueArgs FLAGS_VAR DEFAULT GNU CLANG HCC PGI INTEL INTELLLVM XL MSVC MSVC_INTEL CRAY)
set(singleValueArgs FLAGS_VAR DEFAULT GNU CLANG PGI INTEL INTELLLVM XL MSVC MSVC_INTEL CRAY)
set(multiValueArgs)

# Parse the arguments
Expand Down
1 change: 0 additions & 1 deletion cmake/BLTOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ mark_as_advanced(ENABLE_CLANG_CUDA)
set(BLT_CLANG_CUDA_ARCH "sm_30" CACHE STRING "Compute architecture to use when generating CUDA code with Clang")
mark_as_advanced(BLT_CLANG_CUDA_ARCH)
option(ENABLE_HIP "Enable HIP support" OFF)
option(ENABLE_HCC "Enable HCC support" OFF)
set(CMAKE_HIP_ARCHITECTURES "gfx900" CACHE STRING "gfx architecture to use when generating HIP/ROCm code")

#------------------------------------------------------------------------------
Expand Down
93 changes: 4 additions & 89 deletions cmake/SetupCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,54 +134,26 @@ endif()
# all targets that use <LANG>-Compiler
##########################################

##########################################
# Support extra flags for the C compiler.
##########################################
if(BLT_C_FLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BLT_C_FLAGS}")
message(STATUS "Updated CMAKE_C_FLAGS to \"${CMAKE_C_FLAGS}\"")
endif()

#############################################
# Support extra flags for the C++ compiler.
#############################################
if(BLT_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BLT_CXX_FLAGS}")
message(STATUS "Updated CMAKE_CXX_FLAGS to \"${CMAKE_CXX_FLAGS}\"")
endif()

################################################
# Support extra flags for the Fortran compiler.
################################################
if(ENABLE_FORTRAN AND BLT_FORTRAN_FLAGS)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${BLT_FORTRAN_FLAGS}")
message(STATUS "Updated CMAKE_Fortran_FLAGS to \"${CMAKE_Fortran_FLAGS}\"")
message(STATUS "Updated CMAKE_Fortran_FLAGS to \"${CMAKE_Fortran_FLAGS}\"")
endif()


############################################################
# Map Legacy FindCUDA variables to native cmake variables
# Note - we are intentionally breaking the semicolon delimited
# list that FindCUDA demanded of CUDA_NVCC_FLAGS so users
# are forced to clean up their host configs.
############################################################
if (ENABLE_CUDA)
if (BLT_CUDA_FLAGS)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${BLT_CUDA_FLAGS}")
endif()
# quirk of ordering means that one needs to define -std=c++11 in CMAKE_CUDA_FLAGS if
# --expt-extended-lambda is being used so cmake can get past the compiler check,
# but the CMAKE_CUDA_STANDARD stuff adds another definition in which breaks things.
# So we rip it out here, but it ends up being inserted in the final build rule by cmake.
if (CMAKE_CUDA_FLAGS)
STRING(REPLACE "-std=c++11" " " CMAKE_CUDA_FLAGS ${CMAKE_CUDA_FLAGS} )
endif()
if(ENABLE_CUDA AND BLT_CUDA_FLAGS)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${BLT_CUDA_FLAGS}")
message(STATUS "Updated CMAKE_CUDA_FLAGS to \"${CMAKE_CUDA_FLAGS}\"")
endif()


################################################
# Support extra linker flags
################################################
if(BLT_EXE_LINKER_FLAGS)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${BLT_EXE_LINKER_FLAGS}")
message(STATUS "Updated CMAKE_EXE_LINKER_FLAGS to \"${CMAKE_EXE_LINKER_FLAGS}\"")
Expand Down Expand Up @@ -253,61 +225,6 @@ if(BUILD_SHARED_LIBS)
endif()
endif()

################################
# C++ Standard
################################
if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
message(STATUS "Setting CMAKE_CXX_EXTENSIONS to Off")
set( CMAKE_CXX_EXTENSIONS OFF )
endif ()
SET( CMAKE_CXX_STANDARD_REQUIRED ON )

set(BLT_CXX_STD "" CACHE STRING "Version of C++ standard")
set_property(CACHE BLT_CXX_STD PROPERTY STRINGS c++98 c++11 c++14 c++17)

if (BLT_CXX_STD)
if( BLT_CXX_STD STREQUAL c++98 )
set(CMAKE_CXX_STANDARD 98)
elseif( BLT_CXX_STD STREQUAL c++11 )
set(CMAKE_CXX_STANDARD 11)
blt_append_custom_compiler_flag(
FLAGS_VAR CMAKE_CXX_FLAGS
DEFAULT " "
XL "-std=c++11"
PGI "--c++11")
elseif( BLT_CXX_STD STREQUAL c++14)
set(CMAKE_CXX_STANDARD 14)
blt_append_custom_compiler_flag(
FLAGS_VAR CMAKE_CXX_FLAGS
DEFAULT " "
XL "-std=c++14"
PGI "--c++14")
elseif( BLT_CXX_STD STREQUAL c++17)
# Error out on what does not support C++17
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XL")
message(FATAL_ERROR "XL does not support C++17.")
endif()
if (ENABLE_CUDA AND (NOT DEFINED CMAKE_CUDA_COMPILE_FEATURES OR (NOT "cuda_std_17" IN_LIST CMAKE_CUDA_COMPILE_FEATURES)))
message(FATAL_ERROR "CMake's CUDA_STANDARD does not support C++17.")
endif()

set(CMAKE_CXX_STANDARD 17)
blt_append_custom_compiler_flag(
FLAGS_VAR CMAKE_CXX_FLAGS
DEFAULT " "
PGI "--c++17")
else()
message(FATAL_ERROR "${BLT_CXX_STD} is an invalid entry for BLT_CXX_STD. "
"Valid Options are ( c++98, c++11, c++14, c++17 )")
endif()

if (ENABLE_CUDA)
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD})
endif()

message(STATUS "Standard C++${CMAKE_CXX_STANDARD} selected")
endif()


##################################################################
# Additional compiler warnings and treatment of warnings as errors
Expand All @@ -319,7 +236,6 @@ blt_append_custom_compiler_flag(
CLANG "-Wall -Wextra"
# Additional possibilities for clang include:
# "-Wdocumentation -Wdeprecated -Weverything"
HCC "-Wall"
PGI "-Minform=warn"
MSVC "/W4"
# Additional possibilities for visual studio include:
Expand All @@ -336,7 +252,6 @@ blt_append_custom_compiler_flag(
CLANG "-Wall -Wextra"
# Additional possibilities for clang include:
# "-Wdocumentation -Wdeprecated -Weverything"
HCC "-Wall"
PGI "-Minform=warn"
MSVC "/W4"
# Additional possibilities for visual studio include:
Expand Down
Loading

0 comments on commit 655aa8c

Please sign in to comment.