-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'task/2024_07_caliper_build_support' of https://github.c…
…om/Alpine-DAV/ascent into task/2024_07_caliper_build_support
- Loading branch information
Showing
10 changed files
with
460 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,9 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s | |
|
||
## Unreleased | ||
### Preferred dependency versions for ascent@develop | ||
- [email protected] | ||
- [email protected] (requires [patch](https://github.com/Alpine-DAV/ascent/blob/0aef6cffd522be7419651e6adf586f9a553297d0/scripts/build_ascent/2024_05_03_vtkm-mr3215-ext-geom-fix.patch) ) | ||
- [email protected] | ||
- [email protected] (requires [patch 1](https://github.com/Alpine-DAV/ascent/blob/0aef6cffd522be7419651e6adf586f9a553297d0/scripts/build_ascent/2024_05_03_vtkm-mr3215-ext-geom-fix.patch) | ||
[patch 2](https://github.com/Alpine-DAV/ascent/blob/develop/scripts/build_ascent/2024_07_02_vtkm-mr3246-raysubset_bugfix.patch) ) | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0dc4a5b..fd6baaf 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -57,7 +57,9 @@ cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | ||
### | ||
# grab the version string | ||
### | ||
-file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION SILO_VERSION) | ||
+file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/SILO_VERSION SILO_VERSION) | ||
+# Strip suffix | ||
+string(REGEX REPLACE "-.*" "" SILO_VERSION "${SILO_VERSION}") | ||
|
||
###----------------------------------------------------------------------------- | ||
# project command will automatically create cmake vars for major, minor, | ||
@@ -139,7 +141,9 @@ CMAKE_DEPENDENT_OPTION(SILO_ENABLE_HZIP "Enable Lindstrom hex/quad mesh compress | ||
## | ||
# Set up a default INSTALL prefix that is peer to the build directory | ||
## | ||
-set(CMAKE_INSTALL_PREFIX ${Silo_BINARY_DIR}/../SiloInstall CACHE PATH "install prefix" FORCE) | ||
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
+ set(CMAKE_INSTALL_PREFIX ${Silo_BINARY_DIR}/../SiloInstall CACHE PATH "install prefix" FORCE) | ||
+endif() |
10 changes: 10 additions & 0 deletions
10
scripts/build_ascent/2024_07_29_silo-pr389-win32-bugfix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/src/silo/silo_win32_compatibility.h b/src/silo/silo_win32_compatibility.h | ||
index bc4d38f..00b970c 100644 | ||
--- a/src/silo/silo_win32_compatibility.h | ||
+++ b/src/silo/silo_win32_compatibility.h | ||
@@ -1,4 +1,4 @@ | ||
-#ifdef WIN32 | ||
+#ifdef _WIN32 | ||
#ifndef SILO_WIN32_COMPATIBILITY | ||
#define SILO_WIN32_COMPATIBILITY | ||
#include <io.h> /* Include Windows IO * |
147 changes: 147 additions & 0 deletions
147
scripts/build_ascent/2024_08_01_conduit-pr1311-detect-if-caliper-needs-adiak.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
From 7b25b95c30e083e7d8c541f131df10e401f658d6 Mon Sep 17 00:00:00 2001 | ||
From: Cyrus Harrison <[email protected]> | ||
Date: Thu, 1 Aug 2024 13:26:40 -0700 | ||
Subject: [PATCH] detect if caliper needs adiak | ||
|
||
--- | ||
src/cmake/thirdparty/SetupCaliper.cmake | 47 +++++++++++++++++----- | ||
src/config/conduit_setup_deps.cmake | 52 +++++++++++++++++++------ | ||
2 files changed, 77 insertions(+), 22 deletions(-) | ||
|
||
diff --git a/src/cmake/thirdparty/SetupCaliper.cmake b/src/cmake/thirdparty/SetupCaliper.cmake | ||
index 44ad2cc2e..7469097f3 100644 | ||
--- a/src/cmake/thirdparty/SetupCaliper.cmake | ||
+++ b/src/cmake/thirdparty/SetupCaliper.cmake | ||
@@ -12,24 +12,51 @@ if(NOT CALIPER_DIR) | ||
MESSAGE(FATAL_ERROR "Caliper support needs explicit CALIPER_DIR") | ||
endif() | ||
|
||
-# most common case: caliper is built with adiak support | ||
-# and caliper needs us to find adiak, or else find_pacakge caliper | ||
-# will fail | ||
|
||
-# Check for ADIAK_DIR | ||
+# first: look for caliper config header + see what additional deps we need | ||
+#. to resolve. | ||
+ | ||
+message(STATUS "Attempting to find cali-config.h with CALIPER_DIR=${CALIPER_DIR} ...") | ||
+find_file(CALI_CONFIG_HEADER | ||
+ NAMES caliper-config.h | ||
+ PATHS ${CALIPER_DIR} | ||
+ PATH_SUFFIXES include/caliper | ||
+ NO_DEFAULT_PATH | ||
+ NO_CMAKE_ENVIRONMENT_PATH | ||
+ NO_CMAKE_PATH | ||
+ NO_SYSTEM_ENVIRONMENT_PATH | ||
+ NO_CMAKE_SYSTEM_PATH) | ||
+ | ||
+if(EXISTS ${CALI_CONFIG_HEADER}) | ||
+ message(STATUS "Found Caliper Config Header: ${CALI_CONFIG_HEADER}") | ||
+else() | ||
+ message(FATAL_ERROR "Could not find caliper-config.h in caliper ${CALIPER_DIR}/include/caliper") | ||
+endif() | ||
|
||
-if(NOT ADIAK_DIR) | ||
- MESSAGE(FATAL_ERROR "Caliper support needs explicit ADIAK_DIR") | ||
+file(READ ${CALI_CONFIG_HEADER} _CALI_CONFIG_HEADER_CONTENTS) | ||
+ | ||
+# check if we need ADIAK | ||
+string(FIND ${_CALI_CONFIG_HEADER_CONTENTS} "#define CALIPER_HAVE_ADIAK" _caliper_have_adiak) | ||
+ | ||
+if(${_caliper_have_adiak} GREATER_EQUAL 0 ) | ||
+ # caliper is built with adiak support and caliper needs us to find adiak, | ||
+ # else find_pacakge caliper will fail | ||
+ # Check for ADIAK_DIR | ||
+ if(NOT ADIAK_DIR) | ||
+ MESSAGE(FATAL_ERROR "Caliper support needs explicit ADIAK_DIR") | ||
+ endif() | ||
+ # find adiak | ||
+ find_package(adiak REQUIRED | ||
+ NO_DEFAULT_PATH | ||
+ PATHS ${ADIAK_DIR}/lib/cmake/adiak) | ||
+ set(ADIAK_FOUND TRUE) | ||
endif() | ||
|
||
-find_package(adiak REQUIRED | ||
- NO_DEFAULT_PATH | ||
- PATHS ${ADIAK_DIR}/lib/cmake/adiak) | ||
|
||
find_package(caliper REQUIRED | ||
NO_DEFAULT_PATH | ||
PATHS ${CALIPER_DIR}/share/cmake/caliper) | ||
|
||
-set(ADIAK_FOUND TRUE) | ||
+ | ||
set(CALIPER_FOUND TRUE) | ||
set(CONDUIT_USE_CALIPER TRUE) | ||
diff --git a/src/config/conduit_setup_deps.cmake b/src/config/conduit_setup_deps.cmake | ||
index 0334a2b54..f9022da66 100644 | ||
--- a/src/config/conduit_setup_deps.cmake | ||
+++ b/src/config/conduit_setup_deps.cmake | ||
@@ -58,26 +58,54 @@ if(CALIPER_DIR) | ||
message(STATUS "Conduit was built with Caliper Support") | ||
endif() | ||
|
||
- if(NOT ADIAK_DIR) | ||
- set(ADIAK_DIR ${CONDUIT_ADIAK_DIR}) | ||
+ # use caliper config header to detect necessary deps | ||
+ find_file(CALI_CONFIG_HEADER | ||
+ NAMES caliper-config.h | ||
+ PATHS ${CALIPER_DIR} | ||
+ PATH_SUFFIXES include/caliper | ||
+ NO_DEFAULT_PATH | ||
+ NO_CMAKE_ENVIRONMENT_PATH | ||
+ NO_CMAKE_PATH | ||
+ NO_SYSTEM_ENVIRONMENT_PATH | ||
+ NO_CMAKE_SYSTEM_PATH) | ||
+ | ||
+ if(EXISTS ${CALI_CONFIG_HEADER}) | ||
+ if(NOT Conduit_FIND_QUIETLY) | ||
+ message(STATUS "Found Caliper Config Header: ${CALI_CONFIG_HEADER}") | ||
+ endif() | ||
+ else() | ||
+ message(FATAL_ERROR "Could not find caliper-config.h in caliper ${CALIPER_DIR}/include/caliper") | ||
endif() | ||
|
||
- if(ADIAK_DIR) | ||
- if(NOT Conduit_FIND_QUIETLY) | ||
- message(STATUS "Looking for Adiak at: ${ADIAK_DIR}/lib/cmake/adiak") | ||
+ file(READ ${CALI_CONFIG_HEADER} _CALI_CONFIG_HEADER_CONTENTS) | ||
+ | ||
+ # check if we need ADIAK | ||
+ string(FIND ${_CALI_CONFIG_HEADER_CONTENTS} "#define CALIPER_HAVE_ADIAK" _caliper_have_adiak) | ||
+ | ||
+ if(${_caliper_have_adiak} GREATER_EQUAL 0 ) | ||
+ # caliper is built with adiak support and caliper needs us to find adiak. | ||
+ if(NOT ADIAK_DIR) | ||
+ set(ADIAK_DIR ${CONDUIT_ADIAK_DIR}) | ||
+ endif() | ||
+ | ||
+ if(ADIAK_DIR) | ||
+ if(NOT Conduit_FIND_QUIETLY) | ||
+ message(STATUS "Looking for Adiak at: ${ADIAK_DIR}/lib/cmake/adiak") | ||
+ endif() | ||
+ # find adiak first | ||
+ find_dependency(adiak REQUIRED | ||
+ NO_DEFAULT_PATH | ||
+ PATHS ${ADIAK_DIR}/lib/cmake/adiak) | ||
endif() | ||
- # find adiak first | ||
- find_package(adiak REQUIRED | ||
- NO_DEFAULT_PATH | ||
- PATHS ${ADIAK_DIR}/lib/cmake/adiak) | ||
endif() | ||
+ | ||
if(NOT Conduit_FIND_QUIETLY) | ||
message(STATUS "Looking for Caliper at: ${CALIPER_DIR}/share/cmake/caliper") | ||
endif() | ||
# find caliper | ||
- find_package(caliper REQUIRED | ||
- NO_DEFAULT_PATH | ||
- PATHS ${CALIPER_DIR}/share/cmake/caliper) | ||
+ find_dependency(caliper REQUIRED | ||
+ NO_DEFAULT_PATH | ||
+ PATHS ${CALIPER_DIR}/share/cmake/caliper) | ||
endif() | ||
|
||
############################################################################### |
Oops, something went wrong.