Skip to content

Commit

Permalink
Merge pull request #3760 from vicentebolea/create-minimal-static-build
Browse files Browse the repository at this point in the history
ci: Create static minimal build
  • Loading branch information
vicentebolea committed Aug 23, 2023
2 parents b3cf77e + 1291865 commit 3c3b1a6
Show file tree
Hide file tree
Showing 19 changed files with 189 additions and 168 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ jobs:
shared: static
parallel: ompi
constrains: build_only
- os: ubuntu20.04
compiler: gcc8
shared: static
parallel: serial
steps:
- uses: actions/checkout@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ adios_option(DataMan "Enable support for DataMan" AUTO)
adios_option(DataSpaces "Enable support for DATASPACES" AUTO)
adios_option(MHS "Enable support for MHS" AUTO)
adios_option(SST "Enable support for SST" AUTO)
adios_option(BP5 "Enable support for BP5" AUTO)
adios_option(ZeroMQ "Enable support for ZeroMQ" AUTO)
adios_option(HDF5 "Enable support for the HDF5 engine" AUTO)
adios_option(HDF5_VOL "Enable support for HDF5 ADIOS2 VOL" AUTO)
Expand Down Expand Up @@ -238,9 +237,10 @@ endif()


set(ADIOS2_CONFIG_OPTS
BP5 DataMan DataSpaces HDF5 HDF5_VOL MHS SST Fortran MPI Python Blosc2
BZip2 LIBPRESSIO MGARD PNG SZ ZFP DAOS IME O_DIRECT Sodium Catalyst SysVShMem UCX ZeroMQ
Profiling Endian_Reverse AWSSDK GPU_Support CUDA Kokkos Kokkos_CUDA Kokkos_HIP Kokkos_SYCL
DataMan DataSpaces HDF5 HDF5_VOL MHS SST Fortran MPI Python Blosc2 BZip2
LIBPRESSIO MGARD PNG SZ ZFP DAOS IME O_DIRECT Sodium Catalyst SysVShMem UCX
ZeroMQ Profiling Endian_Reverse AWSSDK GPU_Support CUDA Kokkos Kokkos_CUDA
Kokkos_HIP Kokkos_SYCL
)

GenerateADIOSHeaderConfig(${ADIOS2_CONFIG_OPTS})
Expand Down
1 change: 1 addition & 0 deletions CTestCustom.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"Warning #20208-D: '.*' is treated as '.*' in device code"
"Warning: '.*' is treated as '.*' in device code"
".*was specified as both a system and non-system include directory.*"
"Wunused-command-line-argument"
)
list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
".*/thirdparty/.*"
Expand Down
5 changes: 0 additions & 5 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,6 @@ if(DAOS_FOUND)
set(ADIOS2_HAVE_DAOS TRUE)
endif()

# BP5
if(ADIOS2_USE_BP5)
set(ADIOS2_HAVE_BP5 TRUE)
endif()

#SysV IPC
if(UNIX)
include(CheckSymbolExists)
Expand Down
6 changes: 6 additions & 0 deletions cmake/adios2-config-common.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ if(NOT @BUILD_SHARED_LIBS@)

adios2_add_thirdparty_target(perfstubs-interface)

find_dependency(ffs)
adios2_add_thirdparty_target(ffs)
set_target_properties(adios2::thirdparty::ffs PROPERTIES
INTERFACE_LINK_LIBRARIES ffs::ffs
)

set(ADIOS2_HAVE_SST @ADIOS2_HAVE_SST@)
if(ADIOS2_HAVE_SST)
set(ADIOS2_SST_HAVE_LIBFABRIC @ADIOS2_SST_HAVE_LIBFABRIC@)
Expand Down
9 changes: 6 additions & 3 deletions cmake/adios2-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
set(_ADIOS2_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
list(INSERT CMAKE_MODULE_PATH 0 "@ADIOS2_SOURCE_DIR@/cmake")

if(NOT @BUILD_SHARED_LIBS@)
set(atl_DIR @atl_DIR@)
set(dill_DIR @dill_DIR@)
set(ffs_DIR @ffs_DIR@)
endif()

if(@ADIOS2_HAVE_SST@)
set(EVPath_DIR @EVPath_DIR@)
if(NOT @BUILD_SHARED_LIBS@)
set(atl_DIR @atl_DIR@)
set(dill_DIR @dill_DIR@)
set(ffs_DIR @ffs_DIR@)
set(enet_DIR @enet_DIR@)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/engines/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_Catalyst)
add_library(ParaViewADIOSInSituEngine
add_library(ParaViewADIOSInSituEngine MODULE
ParaViewFidesEngine.cpp)
target_link_libraries(ParaViewADIOSInSituEngine
PUBLIC
Expand Down
2 changes: 1 addition & 1 deletion plugins/operators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_Sodium)
add_library(EncryptionOperator
add_library(EncryptionOperator MODULE
EncryptionOperator.cpp
)
target_link_libraries(EncryptionOperator adios2_core sodium)
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MGARD:BOOL=OFF
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MGARD:BOOL=OFF
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
44 changes: 44 additions & 0 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-serial.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
set(ENV{CC} gcc)
set(ENV{CXX} g++)

set(dashboard_cache "
BUILD_SHARED_LIBS=OFF
CMAKE_BUILD_TYPE:STRING=Release
ADIOS2_BUILD_EXAMPLES:BOOL=OFF
ADIOS2_USE_AWSSDK:STRING=OFF
ADIOS2_USE_Blosc2:STRING=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_BZip2:BOOL=OFF
ADIOS2_USE_Catalyst:STRING=OFF
ADIOS2_USE_CUDA:STRING=OFF
ADIOS2_USE_DAOS:STRING=OFF
ADIOS2_USE_DataMan:BOOL=OFF
ADIOS2_USE_DataSpaces:STRING=OFF
ADIOS2_USE_Fortran:BOOL=OFF
ADIOS2_USE_HDF5:BOOL=OFF
ADIOS2_USE_HDF5_VOL:STRING=OFF
ADIOS2_USE_IME:STRING=OFF
ADIOS2_USE_Kokkos:STRING=OFF
ADIOS2_USE_LIBPRESSIO:STRING=OFF
ADIOS2_USE_MGARD:STRING=OFF
ADIOS2_USE_MHS:STRING=OFF
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_PNG:BOOL=OFF
ADIOS2_USE_Python:BOOL=OFF
ADIOS2_USE_SSC:BOOL=OFF
ADIOS2_USE_SST:BOOL=OFF
ADIOS2_USE_SZ:BOOL=OFF
ADIOS2_USE_ZeroMQ:STRING=OFF
ADIOS2_USE_ZFP:BOOL=OFF
CMAKE_C_COMPILER_LAUNCHER=ccache
CMAKE_CXX_COMPILER_LAUNCHER=ccache
CMAKE_C_FLAGS:STRING=-Wall
CMAKE_CXX_FLAGS:STRING=-Wall
CMAKE_Fortran_FLAGS:STRING=-Wall
")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
4 changes: 2 additions & 2 deletions scripts/dashboard/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ if(dashboard_do_build)
if(COMMAND dashboard_hook_build)
dashboard_hook_build()
endif()
message("Calling ctest_build")
message("Calling ctest_build with CTEST_BUILD_FLAGS: " ${CTEST_BUILD_FLAGS})
ctest_build(
NUMBER_WARNINGS ctest_build_num_warnings
)
Expand All @@ -458,7 +458,7 @@ if(dashboard_do_test)
if(COMMAND dashboard_hook_test)
dashboard_hook_test()
endif()
message("Calling ctest_test")
message("Calling ctest_test with CTEST_TEST_ARGS: " ${CTEST_TEST_ARGS})
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE TEST_RESULTS)
if(${TEST_RESULTS} EQUAL 0)
message("ctest test results return value: ${TEST_RESULTS}")
Expand Down
53 changes: 29 additions & 24 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ add_library(adios2_core
engine/bp4/BP4Reader.cpp engine/bp4/BP4Reader.tcc
engine/bp4/BP4Writer.cpp engine/bp4/BP4Writer.tcc

engine/bp5/BP5Engine.cpp
engine/bp5/BP5Reader.cpp
engine/bp5/BP5Reader.tcc
engine/bp5/BP5Writer.cpp
engine/bp5/BP5Writer_EveryoneWrites_Async.cpp
engine/bp5/BP5Writer.tcc
engine/bp5/BP5Writer_TwoLevelShm_Async.cpp
engine/bp5/BP5Writer_TwoLevelShm.cpp

engine/skeleton/SkeletonReader.cpp engine/skeleton/SkeletonReader.tcc
engine/skeleton/SkeletonWriter.cpp engine/skeleton/SkeletonWriter.tcc

Expand All @@ -61,12 +70,17 @@ add_library(adios2_core

engine/plugin/PluginEngine.cpp engine/plugin/PluginEngineInterface.cpp
operator/plugin/PluginOperator.cpp operator/plugin/PluginOperatorInterface.cpp

#toolkit
toolkit/burstbuffer/FileDrainer.cpp
toolkit/burstbuffer/FileDrainerSingleThread.cpp

toolkit/format/buffer/Buffer.cpp
toolkit/format/buffer/BufferV.cpp
toolkit/format/buffer/malloc/MallocV.cpp
toolkit/format/buffer/chunk/ChunkV.cpp
toolkit/format/buffer/ffs/BufferFFS.cpp
toolkit/format/buffer/heap/BufferSTL.cpp
toolkit/format/buffer/malloc/MallocV.cpp

toolkit/format/bp/BPBase.cpp toolkit/format/bp/BPBase.tcc
toolkit/format/bp/BPSerializer.cpp toolkit/format/bp/BPSerializer.tcc
Expand All @@ -80,6 +94,11 @@ add_library(adios2_core
toolkit/format/bp/bp4/BP4Deserializer.cpp toolkit/format/bp/bp4/BP4Deserializer.tcc
toolkit/format/bp/bpBackCompatOperation/compress/BPBackCompatBlosc.cpp

toolkit/format/bp5/BP5Base.cpp
toolkit/format/bp5/BP5Deserializer.cpp
toolkit/format/bp5/BP5Deserializer.tcc
toolkit/format/bp5/BP5Serializer.cpp

toolkit/profiling/iochrono/Timer.cpp
toolkit/profiling/iochrono/IOChrono.cpp

Expand All @@ -104,9 +123,6 @@ add_library(adios2_core
toolkit/aggregator/mpi/MPIAggregator.cpp
toolkit/aggregator/mpi/MPIChain.cpp
toolkit/aggregator/mpi/MPIShmChain.cpp

toolkit/burstbuffer/FileDrainer.cpp
toolkit/burstbuffer/FileDrainerSingleThread.cpp
)
set_property(TARGET adios2_core PROPERTY EXPORT_NAME core)
set_property(TARGET adios2_core PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_core)
Expand Down Expand Up @@ -145,8 +161,14 @@ target_include_directories(adios2_core
$<BUILD_INTERFACE:${ADIOS2_SOURCE_DIR}/source>
$<BUILD_INTERFACE:${ADIOS2_BINARY_DIR}/source>
)
target_link_libraries(adios2_core PRIVATE adios2sys_interface adios2::thirdparty::pugixml
adios2::thirdparty::yaml-cpp adios2::thirdparty::nlohmann_json adios2::thirdparty::perfstubs-interface)
target_link_libraries(adios2_core PRIVATE
adios2sys_interface
adios2::thirdparty::pugixml
adios2::thirdparty::yaml-cpp
adios2::thirdparty::nlohmann_json
adios2::thirdparty::perfstubs-interface
adios2::thirdparty::ffs
)
target_link_libraries(adios2_core PUBLIC ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(adios2_core PUBLIC "$<BUILD_INTERFACE:${ADIOS2_CXX11_FEATURES}>")

Expand All @@ -162,27 +184,10 @@ endif()
if (ADIOS2_HAVE_SST)
# EVPath-enabled remote file transport
target_sources(adios2_core PRIVATE toolkit/remote/remote_common.cpp toolkit/transport/file/FileRemote.cpp)
target_link_libraries(adios2_core PRIVATE EVPath::EVPath)
target_link_libraries(adios2_core PRIVATE adios2::thirdparty::EVPath)
add_subdirectory(toolkit/remote)
endif()

if (ADIOS2_HAVE_BP5)
target_sources(adios2_core PRIVATE
engine/bp5/BP5Engine.cpp
engine/bp5/BP5Reader.cpp engine/bp5/BP5Reader.tcc
engine/bp5/BP5Writer.cpp engine/bp5/BP5Writer.tcc engine/bp5/BP5Writer_TwoLevelShm.cpp engine/bp5/BP5Writer_TwoLevelShm_Async.cpp engine/bp5/BP5Writer_EveryoneWrites_Async.cpp
)
endif()

if (ADIOS2_HAVE_BP5 OR ADIOS2_HAVE_SST)
target_sources(adios2_core PRIVATE
toolkit/format/buffer/ffs/BufferFFS.cpp
toolkit/format/bp5/BP5Base.cpp
toolkit/format/bp5/BP5Serializer.cpp
toolkit/format/bp5/BP5Deserializer.cpp toolkit/format/bp5/BP5Deserializer.tcc
)
target_link_libraries(adios2_core PRIVATE ffs::ffs)
endif()

if(ADIOS2_HAVE_DAOS)
target_sources(adios2_core PRIVATE toolkit/transport/file/FileDaos.cpp
Expand Down
16 changes: 1 addition & 15 deletions source/adios2/core/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
#include "adios2/engine/bp3/BP3Writer.h"
#include "adios2/engine/bp4/BP4Reader.h"
#include "adios2/engine/bp4/BP4Writer.h"
#ifdef ADIOS2_HAVE_BP5
#include "adios2/engine/bp5/BP5Reader.h"
#include "adios2/engine/bp5/BP5Writer.h"
#endif
#include "adios2/engine/inline/InlineReader.h"
#include "adios2/engine/inline/InlineWriter.h"
#include "adios2/engine/mhs/MhsReader.h"
Expand Down Expand Up @@ -68,14 +66,7 @@ namespace
std::unordered_map<std::string, IO::EngineFactoryEntry> Factory = {
{"bp3", {IO::MakeEngine<engine::BP3Reader>, IO::MakeEngine<engine::BP3Writer>}},
{"bp4", {IO::MakeEngine<engine::BP4Reader>, IO::MakeEngine<engine::BP4Writer>}},
{"bp5",
#ifdef ADIOS2_HAVE_BP5
{IO::MakeEngine<engine::BP5Reader>, IO::MakeEngine<engine::BP5Writer>}
#else
IO::NoEngineEntry("ERROR: this version didn't compile with "
"BP5 library, can't use BP5 engine\n")
#endif
},
{"bp5", {IO::MakeEngine<engine::BP5Reader>, IO::MakeEngine<engine::BP5Writer>}},
{"dataman",
#ifdef ADIOS2_HAVE_DATAMAN
{IO::MakeEngine<engine::DataManReader>, IO::MakeEngine<engine::DataManWriter>}
Expand Down Expand Up @@ -576,13 +567,8 @@ Engine &IO::Open(const std::string &name, const Mode mode, helper::Comm comm)
}
else
{
#ifdef ADIOS2_HAVE_BP5
// File default for writing: BP5
engineTypeLC = "bp5";
#else
// File default for writing: BP4
engineTypeLC = "bp4";
#endif
}
}

Expand Down
2 changes: 0 additions & 2 deletions source/adios2/core/Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const char adios2_version_str[] = ADIOS2_VERSION_STR;

static const char *const engines[] = {"BP3",
"BP4",
#ifdef ADIOS2_HAVE_BP5
"BP5",
#endif
#ifdef ADIOS2_HAVE_HDF5
"HDF5",
#endif
Expand Down
Loading

0 comments on commit 3c3b1a6

Please sign in to comment.