diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fbada3757ab7ac6375e1d974a64216b3e499a41..c0d1a206408adb5f2cdbbb74760f84ecce92050e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,13 +92,6 @@ add_subdirectory(thirdparty) #------------------------------------------------------------------------------# add_subdirectory(source) -#------------------------------------------------------------------------------# -# Installation -#------------------------------------------------------------------------------# -install(DIRECTORY include/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING PATTERN "*.h" -) #------------------------------------------------------------------------------# # Examples #------------------------------------------------------------------------------# diff --git a/include/adios2.h b/include/adios2.h deleted file mode 100644 index f1e7d56c42115d723127ec88af5385fce2c90cfd..0000000000000000000000000000000000000000 --- a/include/adios2.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Distributed under the OSI-approved Apache License, Version 2.0. See - * accompanying file Copyright.txt for details. - * - * ADIOS_CPP.h - * - * Created on: Jan 9, 2017 - * Author: wfg - */ - -#ifndef ADIOS_CPP_H_ -#define ADIOS_CPP_H_ - -#include "ADIOS.h" -#include "ADIOSTypes.h" -#include "core/Method.h" - -#include "core/Engine.h" -#include "core/Transform.h" - -#endif /* ADIOS_CPP_H_ */ diff --git a/include/adios2_c.h b/include/adios2_c.h deleted file mode 100644 index 53f96070e23a352a20e8d923f819c72b1f5fffb2..0000000000000000000000000000000000000000 --- a/include/adios2_c.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Distributed under the OSI-approved Apache License, Version 2.0. See - * accompanying file Copyright.txt for details. - * - * ADIOS_C.h "C" interface to ADIOS C++ class. This header defines the C API - * - * Created on: Oct 31, 2016 - * Author: wfg - */ - -#ifndef ADIOS_C_H_ -#define ADIOS_C_H_ - -#include "ADIOS_MPI.h" - -typedef void ADIOS; -typedef void Method; -typedef void Engine; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * ADIOS Init - * @param mpicomm MPI communicator from user app - */ -void adios_init(MPI_Comm mpiComm); - -/** - * ADIOS Init in debug mode: extra checks - * @param mpicomm MPI communicator from user app - */ -void adios_init_debug(MPI_Comm mpiComm); - -/** - * Sequential version (nompi) - */ -void adios_init_nompi(); - -/** - * - * @param fileName - * @param accessMode - * @param mpiComm - * @return engine handler - */ -int adios_open(const char *fileName, const char *accessMode, MPI_Comm mpiComm); - -/** - * - * @param variableName - * @param values - */ -void adios_write(const char *variableName, const void *values); - -/** - * - * @param handler - */ -void adios_close(const int handler); - -void adios_finalize(const ADIOS *adiosC); // deallocate ADIOS pointer - -void adios_monitor_groups(const ADIOS *adiosC); - -void adios_monitor_groups_file(const ADIOS *adiosC, const char *fileName, - const char *mode); - -#ifdef __cplusplus -} // end extern C -#endif - -#ifdef ADIOS_NOMPI -#undef MPI_Comm -#endif - -#endif /* ADIOS_C_H_ */ diff --git a/source/ADIOS.cpp b/source/ADIOS.cpp index ac6eb562639c56fd3b43fc904a026e00ce6ca4f8..a6748445d727ba46117cb65f744b232dfdc18541 100644 --- a/source/ADIOS.cpp +++ b/source/ADIOS.cpp @@ -20,7 +20,7 @@ #include "ADIOS.tcc" #include "ADIOSMacros.h" -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" // Engines #include "engine/bp/BPFileReader.h" @@ -40,6 +40,7 @@ #include "engine/hdf5/HDF5ReaderP.h" #include "engine/hdf5/HDF5WriterP.h" #endif + namespace adios { diff --git a/include/ADIOS.h b/source/ADIOS.h similarity index 99% rename from include/ADIOS.h rename to source/ADIOS.h index b23d310c9caf03e6ddbe4f0fb9752d6f8123d520..e6d0b8caaeda0cf8fc37cdd15af87741a6f4de4c 100644 --- a/include/ADIOS.h +++ b/source/ADIOS.h @@ -28,7 +28,6 @@ #include "core/Transform.h" #include "core/Variable.h" #include "core/VariableCompound.h" -#include "functions/adiosTemplates.h" namespace adios { diff --git a/include/ADIOS.inl b/source/ADIOS.inl similarity index 100% rename from include/ADIOS.inl rename to source/ADIOS.inl diff --git a/include/ADIOSMacros.h b/source/ADIOSMacros.h similarity index 100% rename from include/ADIOSMacros.h rename to source/ADIOSMacros.h diff --git a/include/ADIOSTypes.h b/source/ADIOSTypes.h similarity index 100% rename from include/ADIOSTypes.h rename to source/ADIOSTypes.h diff --git a/source/ADIOS_C.cpp b/source/ADIOS_C.cpp deleted file mode 100644 index a3306931e5ad22e80525160466606e0013f453bb..0000000000000000000000000000000000000000 --- a/source/ADIOS_C.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Distributed under the OSI-approved Apache License, Version 2.0. See - * accompanying file Copyright.txt for details. - * - * ADIOS_C.cpp - * - * Created on: Oct 31, 2016 - * Author: wfg - */ - -#include <cstring> -#include <fstream> -#include <iostream> -#include <string> - -#include "ADIOS.h" -#include "ADIOS_C.h" - -adios::ADIOS *adios; - -#ifdef __cplusplus -extern "C" { -#endif - -void adios_init(const char *xmlConfigFile, const MPI_Comm mpiComm) -{ - - int rank; - MPI_Comm_rank(mpiComm, &rank); - - try - { - adios = new adios::ADIOS(std::string(xmlConfigFile), mpiComm); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } - - // return ( ADIOS* ) ( adios ); -} - -ADIOS *adios_init_debug(const char *xmlConfigFile, const MPI_Comm mpiComm) -{ - adios::ADIOS *adios; - int rank; - MPI_Comm_rank(mpiComm, &rank); - - try - { - adios = new adios::ADIOS(std::string(xmlConfigFile), mpiComm, true); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } - - return (ADIOS *)(adios); -} - -void adios_open(const ADIOS *adiosC, const char *groupName, - const char *fileName, const char *accessMode) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - int rank; - MPI_Comm_rank(adios->m_MPIComm, &rank); - - try - { - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - adios->Open(std::string(groupName), std::string(fileName), - std::string(accessMode)); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } -} - -void adios_write(const ADIOS *adiosC, const char *groupName, - const char *variableName, const void *values) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - int rank; - MPI_Comm_rank(adios->m_MPIComm, &rank); - - try - { - adios->Write(const std::string(groupName), - const std::string(variableName), values); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } -} - -void adios_close(const ADIOS *adiosC, const char *groupName) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - int rank; - MPI_Comm_rank(adios->m_MPIComm, &rank); - - try - { - adios->Close(std::string(groupName)); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } -} - -void adios_free(const ADIOS *adiosC) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - delete adios; -} - -void adios_monitor_groups(const ADIOS *adiosC) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - int rank; - MPI_Comm_rank(adios->m_MPIComm, &rank); - - try - { - adios->MonitorGroups(std::cout); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } -} - -void adios_monitor_groups_file(const ADIOS *adiosC, const char *fileName, - const char *mode) -{ - adios::ADIOS *adios = (adios::ADIOS *)adiosC; - int rank; - MPI_Comm_rank(adios->m_MPIComm, &rank); - - try - { - std::ofstream fileStream; - - if (strcmp(mode, "a") == 0 || strcmp(mode, "append") == 0) - fileStream.open(fileName, std::ostream::app); - else if (strcmp(mode, "w") == 0 || strcmp(mode, "write") == 0) - fileStream.open(fileName); - - adios->MonitorGroups(fileStream); - } - catch (std::bad_alloc &e) - { - if (rank == 0) - std::cout << "Bad allocation exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::invalid_argument &e) - { - if (rank == 0) - std::cout << "Invalid argument exception, STOPPING PROGRAM\n" - << e.what() << "\n"; - } - catch (std::exception &e) - { - if (rank == 0) - std::cout << "Exception, STOPPING PROGRAM\n" << e.what() << "\n"; - } -} - -#ifdef __cplusplus -} // end extern C -#endif diff --git a/include/ADIOS_MPI.h b/source/ADIOS_MPI.h similarity index 100% rename from include/ADIOS_MPI.h rename to source/ADIOS_MPI.h diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index f088745a2d397f32404a1a221da1975e1669b568..e138a98cdd25722664c415c9868638843fee8cf4 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -5,7 +5,6 @@ add_library(adios2 ADIOS.cpp ADIOS.tcc - #ADIOS_C.cpp capsule/heap/STLVector.cpp capsule/shmem/ShmSystemV.cpp @@ -14,8 +13,10 @@ add_library(adios2 core/Engine.cpp core/Method.cpp core/Support.cpp + core/Timer.cpp core/Transform.cpp core/Transport.cpp + core/adiosFunctions.cpp engine/bp/BPFileReader.cpp engine/bp/BPFileWriter.cpp @@ -24,10 +25,6 @@ add_library(adios2 utilities/format/bp1/BP1Aggregator.cpp utilities/format/bp1/BP1Writer.cpp - utilities/profiling/iochrono/Timer.cpp - - functions/adiosFunctions.cpp - transport/file/FStream.cpp transport/file/FileDescriptor.cpp transport/file/FilePointer.cpp @@ -36,11 +33,11 @@ add_library(adios2 utilities/format/bp1/BP1Aggregator.cpp utilities/format/bp1/BP1Writer.cpp utilities/format/bp1/BP1Writer.tcc - - utilities/profiling/iochrono/Timer.cpp ) target_include_directories(adios2 - PUBLIC ${ADIOS_SOURCE_DIR}/include + PUBLIC + $<BUILD_INTERFACE:${ADIOS_BINARY_DIR}> + $<INSTALL_INTERFACE:include> PRIVATE ${ADIOS_SOURCE_DIR}/source ) @@ -55,7 +52,6 @@ if(ADIOS_USE_DataMan) target_compile_definitions(adios2 PRIVATE ADIOS_HAVE_DATAMAN) target_link_libraries(adios2 PRIVATE ${CMAKE_DL_LIBS}) endif() - if(ADIOS_USE_BZip2) find_package(BZip2 REQUIRED) @@ -64,7 +60,6 @@ if(ADIOS_USE_BZip2) target_link_libraries(adios2 PRIVATE BZip2::BZip2) endif() - if(ADIOS_USE_MPI) find_package(MPI COMPONENTS C REQUIRED) target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH}) @@ -92,9 +87,15 @@ endif() if(ADIOS_USE_HDF5) find_package(HDF5 REQUIRED) if(ADIOS_USE_MPI AND (NOT HDF5_IS_PARALLEL)) - message(FATAL_ERROR "A sequential version of HDF5 was detected but the parallel version of ADIOS is being built, which requires a parallel HDF5.") + message(FATAL_ERROR + "A sequential version of HDF5 was detected but the parallel version " + "of ADIOS is being built, which requires a parallel HDF5." + ) elseif((NOT ADIOS_USE_MPI) AND HDF5_IS_PARALLEL) - message(FATAL_ERROR "A parallel version of HDF5 was detected but the sequential version of ADIOS is being built, which requires a sequential HDF5.") + message(FATAL_ERROR + "A parallel version of HDF5 was detected but the sequential version " + "of ADIOS is being built, which requires a sequential HDF5." + ) endif() target_include_directories(adios2 PRIVATE ${HDF5_INCLUDE_DIRS}) @@ -105,3 +106,33 @@ if(ADIOS_USE_HDF5) target_compile_definitions(adios2 PRIVATE ADIOS_HAVE_HDF5) target_link_libraries(adios2 PRIVATE ${HDF5_C_LIBRARIES}) endif() + +# Main header when using the build directory +set(ADIOS_INCLUDE_DIR "${ADIOS_SOURCE_DIR}/source") +configure_file(adios2.h.in ${ADIOS_BINARY_DIR}/adios2.h) + +# Header installation +set(ADIOS_INCLUDE_DIR "adios2") +configure_file(adios2.h.in ${ADIOS_BINARY_DIR}/adios2.install.h) +install( + FILES ${ADIOS_BINARY_DIR}/adios2.install.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + RENAME adios2.h +) +install( + FILES ADIOS.h ADIOS.inl ADIOSMacros.h ADIOS_MPI.h ADIOSTypes.h mpidummy.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2 +) +install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/core + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2 + FILES_MATCHING REGEX "[^/]*\.(h|inl)$" +) + +# Library installation +install( + TARGETS adios2 EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) diff --git a/source/adios2.h.in b/source/adios2.h.in new file mode 100644 index 0000000000000000000000000000000000000000..6a0a8674b400c0be433c5e219d89998088174b60 --- /dev/null +++ b/source/adios2.h.in @@ -0,0 +1,15 @@ +/* + * Distributed under the OSI-approved Apache License, Version 2.0. See + * accompanying file Copyright.txt for details. + */ + +#ifndef ADIOS2_H_ +#define ADIOS2_H_ + +#include "@ADIOS_INCLUDE_DIR@/ADIOS.h" +#include "@ADIOS_INCLUDE_DIR@/ADIOSTypes.h" +#include "@ADIOS_INCLUDE_DIR@/core/Method.h" +#include "@ADIOS_INCLUDE_DIR@/core/Engine.h" +#include "@ADIOS_INCLUDE_DIR@/core/Transform.h" + +#endif /* ADIOS2_H_ */ diff --git a/include/core/Attribute.h b/source/core/Attribute.h similarity index 100% rename from include/core/Attribute.h rename to source/core/Attribute.h diff --git a/include/core/Capsule.h b/source/core/Capsule.h similarity index 100% rename from include/core/Capsule.h rename to source/core/Capsule.h diff --git a/source/core/Engine.cpp b/source/core/Engine.cpp index 101b5ef676e112a9594267e1f10e18297a4dbaff..bbfe5a978df903e7afef313c5edbab6d436f6a9f 100644 --- a/source/core/Engine.cpp +++ b/source/core/Engine.cpp @@ -12,7 +12,7 @@ #include "core/Engine.h" #include "core/Support.h" -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" namespace adios { diff --git a/include/core/Engine.h b/source/core/Engine.h similarity index 99% rename from include/core/Engine.h rename to source/core/Engine.h index 4954e81b891c036b6a2bf9730f582d277a33aa10..1b1e547be040a6e4d0efd84765db6bcffefd96dd 100644 --- a/include/core/Engine.h +++ b/source/core/Engine.h @@ -21,10 +21,10 @@ #include <vector> /// \endcond -#include "ADIOS_MPI.h" +#include "../ADIOS_MPI.h" -#include "ADIOS.h" -#include "ADIOSTypes.h" +#include "../ADIOS.h" +#include "../ADIOSTypes.h" #include "Capsule.h" #include "Method.h" #include "Transform.h" diff --git a/include/utilities/profiling/iochrono/IOChrono.h b/source/core/IOChrono.h similarity index 54% rename from include/utilities/profiling/iochrono/IOChrono.h rename to source/core/IOChrono.h index 20796d332bffdc0873e9409aa5f439dce1db5c2b..da668822b3d02198014f9731a5f524e768385c06 100644 --- a/include/utilities/profiling/iochrono/IOChrono.h +++ b/source/core/IOChrono.h @@ -15,7 +15,7 @@ #include <vector> /// \endcond -#include "utilities/profiling/iochrono/Timer.h" +#include "Timer.h" namespace adios { @@ -27,14 +27,17 @@ namespace profiling */ struct IOChrono { - std::vector<Timer> - Timers; ///< one timer for each process (open, write, buffering, etc.) - std::vector<unsigned long long int> - TotalBytes; ///< tracks bytes for buffering - bool IsActive = false; ///< flag to determine if profiling is used + ///< one timer for each process (open, write, buffering, etc.) + std::vector<Timer> Timers; + + ///< tracks bytes for buffering + std::vector<unsigned long long int> TotalBytes; + + ///< flag to determine if profiling is used + bool IsActive = false; }; -} // end namespace -} // end namespace +} // end namespace profiling +} // end namespace adios #endif /* IOCHRONO_H_ */ diff --git a/source/core/Method.cpp b/source/core/Method.cpp index 0c91ed23a3d35da0b5b776954d07eccf84a2233a..25b7af4adb2c3538201ccd9ab11b31183f749b98 100644 --- a/source/core/Method.cpp +++ b/source/core/Method.cpp @@ -11,7 +11,7 @@ #include <utility> #include "core/Method.h" -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" namespace adios { diff --git a/include/core/Method.h b/source/core/Method.h similarity index 98% rename from include/core/Method.h rename to source/core/Method.h index e2f06a6f4857348cdbfcff10e7b3c9fad74f48a5..27efc64edb3d20f3767d9d47e727a59141c874d9 100644 --- a/include/core/Method.h +++ b/source/core/Method.h @@ -17,8 +17,8 @@ #include <vector> /// \endcond -#include "ADIOSTypes.h" -#include "functions/adiosFunctions.h" +#include "../ADIOSTypes.h" +#include "adiosFunctions.h" namespace adios { diff --git a/include/core/Selection.h b/source/core/Selection.h similarity index 100% rename from include/core/Selection.h rename to source/core/Selection.h diff --git a/include/core/SelectionBoundingBox.h b/source/core/SelectionBoundingBox.h similarity index 100% rename from include/core/SelectionBoundingBox.h rename to source/core/SelectionBoundingBox.h diff --git a/include/core/SelectionPoints.h b/source/core/SelectionPoints.h similarity index 100% rename from include/core/SelectionPoints.h rename to source/core/SelectionPoints.h diff --git a/source/core/Support.cpp b/source/core/Support.cpp index 65cac135af7ca6a6b428ba5fb5c3a15aedbf7324..7a7785efb716e9f63114fd7f7ef67e9c121b320c 100644 --- a/source/core/Support.cpp +++ b/source/core/Support.cpp @@ -9,7 +9,7 @@ */ #include "core/Support.h" -#include "functions/adiosTemplates.h" +#include "core/adiosTemplates.h" namespace adios { diff --git a/include/core/Support.h b/source/core/Support.h similarity index 100% rename from include/core/Support.h rename to source/core/Support.h diff --git a/source/utilities/profiling/iochrono/Timer.cpp b/source/core/Timer.cpp similarity index 97% rename from source/utilities/profiling/iochrono/Timer.cpp rename to source/core/Timer.cpp index 797cb32b9b8840de2083bcc4f9800a18292881eb..731714489d49f45e885c3690574b029625a35213 100644 --- a/source/utilities/profiling/iochrono/Timer.cpp +++ b/source/core/Timer.cpp @@ -8,7 +8,7 @@ * Author: wfg */ -#include "utilities/profiling/iochrono/Timer.h" +#include "core/Timer.h" namespace adios { @@ -21,8 +21,6 @@ Timer::Timer(const std::string process, const Support::Resolutions resolution, { } -Timer::~Timer() {} - void Timer::SetInitialTime() { m_InitialTime = std::chrono::high_resolution_clock::now(); diff --git a/include/utilities/profiling/iochrono/Timer.h b/source/core/Timer.h similarity index 86% rename from include/utilities/profiling/iochrono/Timer.h rename to source/core/Timer.h index 9bc7817a992ce86fb914abfac027d8870dc6e5e2..62b7b8cfee7d12df993a71f81ea0161f7654f30a 100644 --- a/include/utilities/profiling/iochrono/Timer.h +++ b/source/core/Timer.h @@ -16,7 +16,7 @@ #include <string> /// \endcond -#include "core/Support.h" +#include "Support.h" namespace adios { @@ -40,11 +40,14 @@ public: Timer(const std::string process, const Support::Resolutions resolution, const bool debugMode = false); - ~Timer(); + ~Timer() = default; + + ///< set time to start counting for a process + void SetInitialTime(); + + ///< sets time to measure, it will add to overall process time + void SetTime(); - void SetInitialTime(); ///< set time to start counting for a process - void - SetTime(); ///< sets time to measure, it will add to overall process time std::string GetUnits() const; private: diff --git a/include/core/Transform.h b/source/core/Transform.h similarity index 100% rename from include/core/Transform.h rename to source/core/Transform.h diff --git a/include/core/Transport.h b/source/core/Transport.h similarity index 96% rename from include/core/Transport.h rename to source/core/Transport.h index aa4c67b29ac4f4380d06e68e95ce9c96c7b86caf..4d90414ca582374e2593fbd7d525a64af9181e3c 100644 --- a/include/core/Transport.h +++ b/source/core/Transport.h @@ -16,9 +16,8 @@ #include <vector> /// \endcond -#include "utilities/profiling/iochrono/IOChrono.h" - -#include "ADIOS_MPI.h" +#include "../ADIOS_MPI.h" +#include "IOChrono.h" namespace adios { diff --git a/include/core/Variable.h b/source/core/Variable.h similarity index 100% rename from include/core/Variable.h rename to source/core/Variable.h diff --git a/include/core/VariableBase.h b/source/core/VariableBase.h similarity index 98% rename from include/core/VariableBase.h rename to source/core/VariableBase.h index 1d7270699cc4b8dcecc4f6831831ab248d7a47b3..e05afd69abb172541c4c0e5a9788745538a7fe9e 100644 --- a/include/core/VariableBase.h +++ b/source/core/VariableBase.h @@ -20,8 +20,8 @@ /// \endcond #include "SelectionBoundingBox.h" -#include "functions/adiosFunctions.h" -#include "functions/adiosTemplates.h" +#include "adiosFunctions.h" +#include "adiosTemplates.h" namespace adios { diff --git a/include/core/VariableCompound.h b/source/core/VariableCompound.h similarity index 100% rename from include/core/VariableCompound.h rename to source/core/VariableCompound.h diff --git a/source/functions/adiosFunctions.cpp b/source/core/adiosFunctions.cpp similarity index 99% rename from source/functions/adiosFunctions.cpp rename to source/core/adiosFunctions.cpp index 47ab64cac7c6d82195b1449fc954900249052c31..d2a84b45f37a24be0ecf82fa460565a806d4d0dc 100644 --- a/source/functions/adiosFunctions.cpp +++ b/source/core/adiosFunctions.cpp @@ -24,7 +24,7 @@ /// \endcond #include "core/Support.h" -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" #ifdef ADIOS_HAVE_BZIP2 #include "transform/BZip2.h" diff --git a/include/functions/adiosFunctions.h b/source/core/adiosFunctions.h similarity index 99% rename from include/functions/adiosFunctions.h rename to source/core/adiosFunctions.h index 418a075781663a6e0abcfd60094fb4f73bccf141..6b76c96cc2a69540d04eaf36d2d570ee64a26a0d 100644 --- a/include/functions/adiosFunctions.h +++ b/source/core/adiosFunctions.h @@ -19,9 +19,8 @@ #include <vector> /// \endcond -#include "ADIOS_MPI.h" - -#include "core/Transform.h" +#include "../ADIOS_MPI.h" +#include "Transform.h" namespace adios { diff --git a/include/functions/adiosTemplates.h b/source/core/adiosTemplates.h similarity index 100% rename from include/functions/adiosTemplates.h rename to source/core/adiosTemplates.h diff --git a/include/functions/capsuleTemplates.h b/source/core/capsuleTemplates.h similarity index 99% rename from include/functions/capsuleTemplates.h rename to source/core/capsuleTemplates.h index 2d53eb0484725b71f06f0d6a9e19ffa49589a0fb..5208b184c856f5bad2d5b8d75281a739ec59ac9a 100644 --- a/include/functions/capsuleTemplates.h +++ b/source/core/capsuleTemplates.h @@ -17,7 +17,7 @@ #include <vector> /// \endcond -#include "core/Transport.h" +#include "Transport.h" namespace adios { diff --git a/source/engine/adios1/ADIOS1Reader.cpp b/source/engine/adios1/ADIOS1Reader.cpp index 2cb851c18ece85b8f2aa1df47ec398b6ba46f484..376927bc0a22b6e994d6785e061130a913e5b082 100644 --- a/source/engine/adios1/ADIOS1Reader.cpp +++ b/source/engine/adios1/ADIOS1Reader.cpp @@ -9,7 +9,7 @@ */ #include "core/Support.h" -#include "functions/adiosFunctions.h" // CSVToVector +#include "core/adiosFunctions.h" // CSVToVector #include "transport/file/FStream.h" // uses C++ fstream #include "transport/file/FileDescriptor.h" // uses POSIX #include "transport/file/FilePointer.h" // uses C FILE* diff --git a/source/engine/adios1/ADIOS1Writer.cpp b/source/engine/adios1/ADIOS1Writer.cpp index 4e762b4d254ded73429296b741b01fde5bab5e42..d66714bed2f3ce57ff4c0b16e0b1c5bfa72ba298 100644 --- a/source/engine/adios1/ADIOS1Writer.cpp +++ b/source/engine/adios1/ADIOS1Writer.cpp @@ -10,7 +10,7 @@ * Author: pnb */ -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" #include "ADIOS1Writer.h" diff --git a/source/engine/bp/BPFileReader.cpp b/source/engine/bp/BPFileReader.cpp index 27632b4c5dc7917c41f4e98d663dfa37facd6a4b..265ab95bf72c22ae74f750c9b1e55866f0091d2e 100644 --- a/source/engine/bp/BPFileReader.cpp +++ b/source/engine/bp/BPFileReader.cpp @@ -11,7 +11,7 @@ #include "BPFileReader.h" #include "core/Support.h" -#include "functions/adiosFunctions.h" // CSVToVector +#include "core/adiosFunctions.h" // CSVToVector #include "transport/file/FStream.h" // uses C++ fstream #include "transport/file/FileDescriptor.h" // uses POSIX #include "transport/file/FilePointer.h" // uses C FILE* diff --git a/source/engine/dataman/DataManReader.cpp b/source/engine/dataman/DataManReader.cpp index 6a38f3606f093a9b93b3fd8a9fade5258b06ef6c..32cfdb9679013a93b3b3e5f6a02be8d13236c835 100644 --- a/source/engine/dataman/DataManReader.cpp +++ b/source/engine/dataman/DataManReader.cpp @@ -11,8 +11,8 @@ #include "DataManReader.h" #include "core/Support.h" +#include "core/adiosFunctions.h" //CSVToVector #include "external/json.hpp" -#include "functions/adiosFunctions.h" //CSVToVector // supported transports #include "transport/file/FStream.h" // uses C++ fstream diff --git a/source/engine/dataman/DataManWriter.cpp b/source/engine/dataman/DataManWriter.cpp index 6e24b011735599042e1fbc593803786489fa9de6..bd2ef126d6b6699f4380149f8ebb6bec432bd56b 100644 --- a/source/engine/dataman/DataManWriter.cpp +++ b/source/engine/dataman/DataManWriter.cpp @@ -13,7 +13,7 @@ #include "DataManWriter.h" #include "core/Support.h" -#include "functions/adiosFunctions.h" //CSVToVector +#include "core/adiosFunctions.h" //CSVToVector // supported transports #include "transport/file/FStream.h" // uses C++ fstream diff --git a/source/engine/hdf5/HDF5WriterP.cpp b/source/engine/hdf5/HDF5WriterP.cpp index 7f021910842ec3a055819423e70d23ea430ac678..40837346de7f92b704a63217816ca0ce8906334a 100644 --- a/source/engine/hdf5/HDF5WriterP.cpp +++ b/source/engine/hdf5/HDF5WriterP.cpp @@ -13,7 +13,7 @@ #include "HDF5WriterP.h" #include "core/Support.h" -#include "functions/adiosFunctions.h" //CSVToVector +#include "core/adiosFunctions.h" //CSVToVector namespace adios { diff --git a/include/mpidummy.h b/source/mpidummy.h similarity index 100% rename from include/mpidummy.h rename to source/mpidummy.h diff --git a/source/utilities/format/bp1/BP1Base.cpp b/source/utilities/format/bp1/BP1Base.cpp index 506298eb6eeba6c6e6b09e94dba413bf922a9fb3..c31d5dec19999851e53abc918728dbfe53677851 100644 --- a/source/utilities/format/bp1/BP1Base.cpp +++ b/source/utilities/format/bp1/BP1Base.cpp @@ -9,7 +9,7 @@ */ #include "BP1Base.h" -#include "functions/adiosFunctions.h" +#include "core/adiosFunctions.h" namespace adios { diff --git a/source/utilities/format/bp1/BP1Structs.h b/source/utilities/format/bp1/BP1Structs.h index c0c50a0a6bdcfa44949c60388741105b5023ebeb..77f22feb80510bc1acf458c633a7bb39b99d8fac 100644 --- a/source/utilities/format/bp1/BP1Structs.h +++ b/source/utilities/format/bp1/BP1Structs.h @@ -18,7 +18,7 @@ #include <vector> /// \endcond -#include "utilities/profiling/iochrono/IOChrono.h" +#include "core/IOChrono.h" namespace adios { diff --git a/source/utilities/format/bp1/BP1Writer.h b/source/utilities/format/bp1/BP1Writer.h index e293077713319b5d182aec28afd3a0a18c9933a7..b8876c7f34b0e671d5fa42f25d2e013f7cef806f 100644 --- a/source/utilities/format/bp1/BP1Writer.h +++ b/source/utilities/format/bp1/BP1Writer.h @@ -24,8 +24,8 @@ #include "capsule/heap/STLVector.h" #include "core/Variable.h" -#include "functions/adiosFunctions.h" -#include "functions/adiosTemplates.h" +#include "core/adiosFunctions.h" +#include "core/adiosTemplates.h" namespace adios { diff --git a/thirdparty/KWSys/CMakeLists.txt b/thirdparty/KWSys/CMakeLists.txt index 058c8f9ef4b292dae879db5cc061f10b0dfed2d7..15166f82a0732ae99c06184559b4479a14b76818 100644 --- a/thirdparty/KWSys/CMakeLists.txt +++ b/thirdparty/KWSys/CMakeLists.txt @@ -1,5 +1,9 @@ set(KWSYS_NAMESPACE adios2sys) set(KWSYS_USE_DynamicLoader ON) set(KWSYS_BUILD_SHARED OFF) +if(NOT ADIOS_BUILD_SHARED_LIBS) + set(KWSYS_INSTALL_EXPORT_NAME adios2) + set(KWSYS_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR}) +endif() add_subdirectory(adios2sys)