-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add catalyst and adios #214
base: master
Are you sure you want to change the base?
Changes from all commits
41507d8
da5e837
ff57a33
05e2192
b1d57d6
fcac0f1
3b0d65b
bfdc5bc
ccfcc31
0385675
537a527
2bb56ee
436518e
864ed87
bed4502
0f4ca9c
0b47e93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ option( ENABLE_SCOTCH "" ON ) | |
option( ENABLE_SUITESPARSE "" ON ) | ||
option( ENABLE_VTK "" ON ) | ||
option( ENABLE_VTK_WRAP_PYTHON "" OFF ) | ||
option( ENABLE_CATALYST "Enable building catalyst2" ON) | ||
option( ENABLE_FESAPI "" ON ) | ||
|
||
option( ENABLE_NINJA "" OFF ) | ||
|
@@ -234,7 +235,7 @@ list(APPEND build_list hdf5 ) | |
# Conduit | ||
################################ | ||
set(CONDUIT_DIR "${CMAKE_INSTALL_PREFIX}/conduit") | ||
set(CONDUIT_URL "${TPL_MIRROR_DIR}/conduit-0.8.2.tar.gz") | ||
set(CONDUIT_URL "${TPL_MIRROR_DIR}/conduit-0.8.6.zip") | ||
message(STATUS "Building Conduit found at ${CONDUIT_URL}") | ||
|
||
if( ${ENABLE_MPI} ) | ||
|
@@ -1109,7 +1110,8 @@ endif() | |
################################ | ||
if( ENABLE_VTK ) | ||
set( VTK_DIR "${CMAKE_INSTALL_PREFIX}/vtk" ) | ||
set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.2.6.tar.gz" ) | ||
set( VTK_URL "${TPL_MIRROR_DIR}/VTK-59d89108f4.tar.gz" ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you do not need to change, but a think a nightly (with a date as a version) is slightly more readable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, I was not aware of the nightly VTK downloads, I will use that and update the repo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see below |
||
|
||
|
||
message( STATUS "Building VTK found at ${VTK_URL}" ) | ||
|
||
|
@@ -1119,6 +1121,12 @@ if( ENABLE_VTK ) | |
# I'm no cmake expert and I do not know if there was a better way to deal with it. | ||
set( VTK_CMAKE_INSTALL_LIBDIR "lib" ) | ||
|
||
# This compile option will enclose all of the VTK library within a vtk_geosx namespace. | ||
# This mangling is needed in order to ensure that the VTK included with geosx does | ||
# not interfere with another VTK version that may be linked dynamically at runtime | ||
# (when using ParaView's Catalyst implementation for example). | ||
set( VTK_ABI_NAMESPACE_NAME "vtk_geos" ) | ||
|
||
if( ENABLE_MPI ) | ||
set( VTK_C_COMPILER ${MPI_C_COMPILER} ) | ||
set( VTK_CXX_COMPILER ${MPI_CXX_COMPILER} ) | ||
|
@@ -1137,9 +1145,9 @@ endif( ENABLE_MPI ) | |
PREFIX ${PROJECT_BINARY_DIR}/vtk | ||
URL ${VTK_URL} | ||
INSTALL_DIR ${VTK_DIR} | ||
PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/vtkXMLReader-fpe.patch | ||
BUILD_COMMAND ${TPL_BUILD_COMMAND} | ||
INSTALL_COMMAND "${TPL_INSTALL_COMMAND}" | ||
PATCH_COMMAND patch -p1 < ${TPL_MIRROR_DIR}/VTK-ABI.patch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this a patch ? seems like it should be updated upstream There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been updated upstream, but to avoid wasting time with the merge I made this patch and then forgot about it. I will update VTK with a nightly build and take out the patch There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
||
CMAKE_GENERATOR ${TPL_GENERATOR} | ||
CMAKE_ARGS -D CMAKE_C_COMPILER=${VTK_C_COMPILER} | ||
-D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} | ||
|
@@ -1165,11 +1173,102 @@ endif( ENABLE_MPI ) | |
-D VTK_MODULE_ENABLE_VTK_IOXML=YES | ||
-D VTK_MODULE_ENABLE_VTK_IOLegacy=YES | ||
-D VTK_BUILD_TESTING=OFF | ||
-D VTK_LEGACY_REMOVE=ON ) | ||
-D VTK_LEGACY_REMOVE=ON | ||
-D VTK_ABI_NAMESPACE_NAME=${VTK_ABI_NAMESPACE_NAME} ) | ||
|
||
list( APPEND build_list vtk ) | ||
endif( ENABLE_VTK ) | ||
|
||
################################ | ||
# Catalyst | ||
################################ | ||
|
||
if (ENABLE_CATALYST) | ||
|
||
# Catalyst supports different implementations of its interface | ||
set( CATALYST_IMPLEMENTATION_NAME "ADIOS2" CACHE STRING "The name of the catalyst implementation you would like to use") | ||
|
||
# Set the type of implementations that GEOSX-TPL provides as options here | ||
set_property(CACHE CATALYST_IMPLEMENTATION_NAME PROPERTY STRINGS ADIOS2) | ||
|
||
|
||
message(STATUS "Catalyst implementation: " ${CATALYST_IMPLEMENTATION_NAME}) | ||
if (NOT CATALYST_IMPLEMENTATION_NAME STREQUAL "ADIOS2") | ||
message(FATAL_ERROR "TPL only provides catalyst-adios2 implementation for now") | ||
endif () | ||
|
||
if (NOT ENABLE_MPI) | ||
message (FATAL_ERROR "ADIOS2 requires MPI in its build") | ||
endif () | ||
|
||
set(ADIOS_DIR "${CMAKE_INSTALL_PREFIX}/adios") | ||
set(ADIOS_URL "${TPL_MIRROR_DIR}/ADIOS2-2.9.0.zip") | ||
|
||
ExternalProject_Add( adios | ||
URL ${ADIOS_URL} | ||
PREFIX ${PROJECT_BINARY_DIR}/adios | ||
INSTALL_DIR ${ADIOS_DIR} | ||
BUILD_COMMAND ${TPL_BUILD_COMMAND} | ||
INSTALL_COMMAND ${TPL_INSTALL_COMMAND} | ||
CMAKE_GENERATOR ${TPL_GENERATOR} | ||
CMAKE_ARGS -DCMAKE_C_COMPILER=${MPI_C_COMPILER} | ||
-DCMAKE_CXX_COMPILER=${MPI_CXX_COMPILER} | ||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_CXX_STANDARD=11 | ||
-DADIOS2_USE_Fortran=OFF | ||
-DADIOS2_USE_MPI=ON | ||
-DNoGitVersionString:BOOL=ON | ||
) | ||
|
||
set(CATALYST_DIR "${CMAKE_INSTALL_PREFIX}/catalyst") | ||
set(CATALYST_URL "${TPL_MIRROR_DIR}/catalyst-afa7ec79.tar.gz") | ||
|
||
ExternalProject_Add( catalyst | ||
URL ${CATALYST_URL} | ||
PREFIX ${PROJECT_BINARY_DIR}/catalyst | ||
INSTALL_DIR ${CATALYST_DIR} | ||
BUILD_COMMAND ${TPL_BUILD_COMMAND} | ||
INSTALL_COMMAND ${TPL_INSTALL_COMMAND} | ||
CMAKE_GENERATOR ${TPL_GENERATOR} | ||
CMAKE_ARGS -DCMAKE_C_COMPILER=${MPI_C_COMPILER} | ||
-DCMAKE_CXX_COMPILER=${MPI_CXX_COMPILER} | ||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_CXX_STANDARD=11 | ||
-DNoGitVersionString:BOOL=ON | ||
) | ||
|
||
|
||
set(CATALYST_IMPLEMENTATION_DIR "${CMAKE_INSTALL_PREFIX}/catalyst_implementation") | ||
set(CATALYST_IMPLEMENTATION_URL "${TPL_MIRROR_DIR}/adioscatalyst-72a75a88.tar.gz") | ||
|
||
set(ADIOS_CMAKE_PREFIX ${ADIOS_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/adios2/) | ||
|
||
set(CATALYST_CMAKE_PREFIX ${CATALYST_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/catalyst-2.0/) | ||
|
||
ExternalProject_Add( catalyst_implementation | ||
URL ${CATALYST_IMPLEMENTATION_URL} | ||
PREFIX ${PROJECT_BINARY_DIR}/catalyst_implementation | ||
INSTALL_DIR ${CATALYST_IMPLEMENTATION_DIR} | ||
PATCH_COMMAND patch CMakeLists.txt < ${TPL_MIRROR_DIR}/adioscatalyst-cmake-version.patch | ||
BUILD_COMMAND ${TPL_BUILD_COMMAND} | ||
INSTALL_COMMAND ${TPL_INSTALL_COMMAND} | ||
DEPENDS adios catalyst | ||
CMAKE_GENERATOR ${TPL_GENERATOR} | ||
CMAKE_ARGS -DCMAKE_C_COMPILER=${MPI_C_COMPILER} | ||
-DCMAKE_CXX_COMPILER=${MPI_CXX_COMPILER} | ||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_CXX_STANDARD=11 | ||
-DADIOS2_DIR=${ADIOS_CMAKE_PREFIX} | ||
-Dcatalyst_DIR=${CATALYST_CMAKE_PREFIX} | ||
-DNoGitVersionString:BOOL=ON | ||
) | ||
|
||
|
||
|
||
list(APPEND build_list adios catalyst catalyst_implementation) | ||
|
||
endif (ENABLE_CATALYST) | ||
|
||
################################ | ||
# FMT | ||
################################ | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
diff --git a/Common/Core/vtkValueFromString.cxx b/Common/Core/vtkValueFromString.cxx | ||
index 9e619a87a5..93ca79486d 100644 | ||
--- a/Common/Core/vtkValueFromString.cxx | ||
+++ b/Common/Core/vtkValueFromString.cxx | ||
@@ -203,6 +203,8 @@ const char* ParseInt(const char* it, const char* end, bool minus_sign, int base, | ||
} | ||
} | ||
|
||
+VTK_ABI_NAMESPACE_BEGIN | ||
+ | ||
// Overload for integers | ||
template <typename T, | ||
typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value, bool>::type = | ||
diff --git a/Filters/Core/vtkFieldDataToDataSetAttribute.cxx b/Filters/Core/vtkFieldDataToDataSetAttribute.cxx | ||
index 9a8b23c67b..d8a451eca8 100644 | ||
--- a/Filters/Core/vtkFieldDataToDataSetAttribute.cxx | ||
+++ b/Filters/Core/vtkFieldDataToDataSetAttribute.cxx | ||
@@ -28,6 +28,7 @@ | ||
|
||
#include <set> | ||
|
||
+VTK_ABI_NAMESPACE_BEGIN | ||
vtkStandardNewMacro(vtkFieldDataToDataSetAttribute); | ||
|
||
//------------------------------------------------------------------------------ | ||
diff --git a/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapper.cxx b/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapper.cxx | ||
index 6b00e7ff0f..b8d879ac9b 100644 | ||
--- a/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapper.cxx | ||
+++ b/Rendering/LICOpenGL2/vtkCompositeSurfaceLICMapper.cxx | ||
@@ -54,6 +54,8 @@ | ||
|
||
#include "vtkSurfaceLICInterface.h" | ||
|
||
+VTK_ABI_NAMESPACE_BEGIN | ||
+ | ||
vtkStandardNewMacro(vtkCompositeSurfaceLICMapper); | ||
//------------------------------------------------------------------------------ | ||
vtkCompositeSurfaceLICMapper::vtkCompositeSurfaceLICMapper() = default; | ||
diff --git a/Rendering/OpenGL2/vtkOpenGLBatchedPolyDataMapper.cxx b/Rendering/OpenGL2/vtkOpenGLBatchedPolyDataMapper.cxx | ||
index d46b537d33..1ea50351bf 100644 | ||
--- a/Rendering/OpenGL2/vtkOpenGLBatchedPolyDataMapper.cxx | ||
+++ b/Rendering/OpenGL2/vtkOpenGLBatchedPolyDataMapper.cxx | ||
@@ -42,7 +42,6 @@ | ||
#include "vtkUnsignedIntArray.h" | ||
#include <sstream> | ||
|
||
-VTK_ABI_NAMESPACE_BEGIN | ||
namespace | ||
{ | ||
template <typename T> | ||
@@ -64,6 +63,8 @@ private: | ||
|
||
} // end anonymous namespace | ||
|
||
+VTK_ABI_NAMESPACE_BEGIN | ||
+ | ||
//------------------------------------------------------------------------------ | ||
vtkStandardNewMacro(vtkOpenGLBatchedPolyDataMapper); | ||
|
||
@@ -1643,3 +1644,5 @@ int vtkOpenGLBatchedPolyDataMapper::CanUseTextureMapForColoring(vtkDataObject*) | ||
|
||
return 1; | ||
} | ||
+ | ||
+VTK_ABI_NAMESPACE_END |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0b2691e..58d0f82 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1,4 +1,4 @@ | ||
-cmake_minimum_required(VERSION 3.20) | ||
+cmake_minimum_required(VERSION 3.15) | ||
|
||
project(AdiosCatalyst LANGUAGES C CXX) | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the Catalyst version, is this wanted ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I don't think we should tether geosx's
conduit
version tocatalyst
's. This is just an update of theconduit
package to get some things compiling