diff --git a/include/core/Transport.h b/include/core/Transport.h index 12bbb6ae22aa5156c9ec6f4a1e17f3afd1a57d40..738bb65c3ec802b94e6d5df1f7e9485cc5386398 100644 --- a/include/core/Transport.h +++ b/include/core/Transport.h @@ -15,12 +15,11 @@ #include <string> #include <vector> -#include "../utilities/profiling/iochrono/IOChrono.h" +#include "utilities/profiling/iochrono/IOChrono.h" /// \endcond #include "ADIOS_MPI.h" - namespace adios { @@ -45,7 +44,7 @@ public: * @param mpiComm passed to m_MPIComm * @param debugMode passed to m_DebugMode */ - Transport(std::string type, MPI_Comm mpiComm, bool debugMode); + Transport(const std::string type, MPI_Comm mpiComm, const bool debugMode); virtual ~Transport() = default; diff --git a/include/engine/bp/BPFileWriter.h b/include/engine/bp/BPFileWriter.h index ca0353cad321d41f37dafffc7ccf95180fa1bcfa..b10e2d0ea22877e9286f9b61c3b774d49d4744cd 100644 --- a/include/engine/bp/BPFileWriter.h +++ b/include/engine/bp/BPFileWriter.h @@ -31,10 +31,10 @@ public: * @param method * @param debugMode */ + BPFileWriter(ADIOS &adios, const std::string name, const std::string accessMode, MPI_Comm mpiComm, const Method &method); - ~BPFileWriter(); void Write(Variable<char> &variable, const char *values); diff --git a/include/utilities/profiling/iochrono/Timer.h b/include/utilities/profiling/iochrono/Timer.h index 1ded96cb0b2a0ef1b9d8667f29af771faf61dcea..0353fde670c8e60b4f224b594704b5e2db832498 100644 --- a/include/utilities/profiling/iochrono/Timer.h +++ b/include/utilities/profiling/iochrono/Timer.h @@ -31,10 +31,6 @@ public: unsigned long long int m_ProcessTime = 0; /** - * - */ - /** - * * Timer object constructor using std::chrono class * @param process name of process to be measured * @param resolution time resolution (mus, ms, s, etc.) from Resolutions in diff --git a/scripts/developer/setup.sh b/scripts/developer/setup.sh index 082cb1257d281c1b0da397b8c5728aa4bffa5129..27607008e8eb0a4ed5c0ead760070e8bad72c77b 100755 --- a/scripts/developer/setup.sh +++ b/scripts/developer/setup.sh @@ -15,4 +15,4 @@ test_cmd scripts/developer/git/setup-aliases \ test_cmd scripts/developer/git/setup-hooks \ "Failed to setup git hooks" 1 -git config hooks.clang-format true +git config hooks.clang-format false diff --git a/source/core/Engine.cpp b/source/core/Engine.cpp index a27a1c2863c71a063e966e8a44951b8d5a4316f5..0ea379f8716c8b59a042294cb87295e865d7a198 100644 --- a/source/core/Engine.cpp +++ b/source/core/Engine.cpp @@ -21,10 +21,10 @@ Engine::Engine(ADIOS &adios, const std::string engineType, const std::string name, const std::string accessMode, MPI_Comm mpiComm, const Method &method, const std::string endMessage) -: m_MPIComm{mpiComm}, m_EngineType{std::move(engineType)}, - m_Name{std::move(name)}, m_AccessMode{std::move(accessMode)}, - m_Method{method}, m_ADIOS(adios), m_EndMessage(std::move(endMessage)), - m_DebugMode{m_Method.m_DebugMode}, m_nThreads{m_Method.m_nThreads} +: m_MPIComm(mpiComm), m_EngineType(engineType), m_Name(name), + m_AccessMode(accessMode), m_Method(method), m_ADIOS(adios), + m_EndMessage(endMessage), m_DebugMode(m_Method.m_DebugMode), + m_nThreads(m_Method.m_nThreads) { if (m_DebugMode == true) { @@ -48,44 +48,93 @@ void Engine::SetCallBack(std::function<void(const void *, std::string, // should these functions throw an exception? -// clang-format off -void Engine::Write(Variable<char> &variable, const char *values) {} -void Engine::Write(Variable<unsigned char> &variable, const unsigned char *values){ } -void Engine::Write(Variable<short> &variable, const short *values) {} -void Engine::Write(Variable<unsigned short> &variable, const unsigned short *values) {} -void Engine::Write(Variable<int> &variable, const int *values) {} -void Engine::Write(Variable<unsigned int> &variable, const unsigned int *values) {} -void Engine::Write(Variable<long int> &variable, const long int *values) {} -void Engine::Write(Variable<unsigned long int> &variable, const unsigned long int *values) {} -void Engine::Write(Variable<long long int> &variable, const long long int *values) {} -void Engine::Write(Variable<unsigned long long int> &variable, const unsigned long long int *values) {} -void Engine::Write(Variable<float> &variable, const float *values) {} -void Engine::Write(Variable<double> &variable, const double *values) {} -void Engine::Write(Variable<long double> &variable, const long double *values) {} -void Engine::Write(Variable<std::complex<float>> &variable, const std::complex<float> *values) {} -void Engine::Write(Variable<std::complex<double>> &variable, const std::complex<double> *values) {} -void Engine::Write(Variable<std::complex<long double>> &variable, const std::complex<long double> *values) {} -void Engine::Write(VariableCompound &variable, const void *values) {} +void Engine::Write(Variable<char> &variable, const char *values) {} +void Engine::Write(Variable<unsigned char> &variable, + const unsigned char *values) +{ +} +void Engine::Write(Variable<short> &variable, const short *values) {} +void Engine::Write(Variable<unsigned short> &variable, + const unsigned short *values) +{ +} +void Engine::Write(Variable<int> &variable, const int *values) {} +void Engine::Write(Variable<unsigned int> &variable, const unsigned int *values) +{ +} +void Engine::Write(Variable<long int> &variable, const long int *values) {} +void Engine::Write(Variable<unsigned long int> &variable, + const unsigned long int *values) +{ +} +void Engine::Write(Variable<long long int> &variable, + const long long int *values) +{ +} +void Engine::Write(Variable<unsigned long long int> &variable, + const unsigned long long int *values) +{ +} +void Engine::Write(Variable<float> &variable, const float *values) {} +void Engine::Write(Variable<double> &variable, const double *values) {} +void Engine::Write(Variable<long double> &variable, const long double *values) +{ +} +void Engine::Write(Variable<std::complex<float>> &variable, + const std::complex<float> *values) +{ +} +void Engine::Write(Variable<std::complex<double>> &variable, + const std::complex<double> *values) +{ +} +void Engine::Write(Variable<std::complex<long double>> &variable, + const std::complex<long double> *values) +{ +} +void Engine::Write(VariableCompound &variable, const void *values) {} // String version void Engine::Write(const std::string variableName, const char *values) {} -void Engine::Write(const std::string variableName, const unsigned char *values) {} +void Engine::Write(const std::string variableName, const unsigned char *values) +{ +} void Engine::Write(const std::string variableName, const short *values) {} -void Engine::Write(const std::string variableName, const unsigned short *values) {} +void Engine::Write(const std::string variableName, const unsigned short *values) +{ +} void Engine::Write(const std::string variableName, const int *values) {} -void Engine::Write(const std::string variableName, const unsigned int *values) {} +void Engine::Write(const std::string variableName, const unsigned int *values) +{ +} void Engine::Write(const std::string variableName, const long int *values) {} -void Engine::Write(const std::string variableName, const unsigned long int *values) {} -void Engine::Write(const std::string variableName, const long long int *values) {} -void Engine::Write(const std::string variableName, const unsigned long long int *values) {} +void Engine::Write(const std::string variableName, + const unsigned long int *values) +{ +} +void Engine::Write(const std::string variableName, const long long int *values) +{ +} +void Engine::Write(const std::string variableName, + const unsigned long long int *values) +{ +} void Engine::Write(const std::string variableName, const float *values) {} void Engine::Write(const std::string variableName, const double *values) {} void Engine::Write(const std::string variableName, const long double *values) {} -void Engine::Write(const std::string variableName, const std::complex<float> *values) {} -void Engine::Write(const std::string variableName, const std::complex<double> *values) {} -void Engine::Write(const std::string variableName, const std::complex<long double> *values) {} +void Engine::Write(const std::string variableName, + const std::complex<float> *values) +{ +} +void Engine::Write(const std::string variableName, + const std::complex<double> *values) +{ +} +void Engine::Write(const std::string variableName, + const std::complex<long double> *values) +{ +} void Engine::Write(const std::string variableName, const void *values) {} -// clang-format on void Engine::Advance(float timeout_sec) {} void Engine::Advance(AdvanceMode mode, float timeout_sec) {} diff --git a/source/core/Transport.cpp b/source/core/Transport.cpp index a1f12ac44a993c13e449b3acac971a47e79bf20c..ca1931ce4be363147203aad33219539784c24054 100644 --- a/source/core/Transport.cpp +++ b/source/core/Transport.cpp @@ -15,8 +15,9 @@ namespace adios { -Transport::Transport(std::string type, MPI_Comm mpiComm, bool debugMode) -: m_Type{type}, m_MPIComm{mpiComm}, m_DebugMode{debugMode} +Transport::Transport(const std::string type, MPI_Comm mpiComm, + const bool debugMode) +: m_Type(type), m_MPIComm(mpiComm), m_DebugMode(debugMode) { MPI_Comm_rank(m_MPIComm, &m_RankMPI); MPI_Comm_size(m_MPIComm, &m_SizeMPI); diff --git a/source/engine/bp/BPFileWriter.cpp b/source/engine/bp/BPFileWriter.cpp index 414deec61b3092c06b83d6f6567b28abe80e676b..1a126de90ae747e321ba33d27d83a2d9aff641d8 100644 --- a/source/engine/bp/BPFileWriter.cpp +++ b/source/engine/bp/BPFileWriter.cpp @@ -7,9 +7,10 @@ * Created on: Dec 19, 2016 * Author: wfg */ +#include <utility> -#include "engine/bp/BPFileWriter.h" #include "ADIOS.h" +#include "engine/bp/BPFileWriter.h" // supported transports #include "transport/file/FStream.h" @@ -24,9 +25,9 @@ BPFileWriter::BPFileWriter(ADIOS &adios, const std::string name, const Method &method) : Engine(adios, "BPFileWriter", name, accessMode, mpiComm, method, " BPFileWriter constructor (or call to ADIOS Open).\n"), - m_Buffer{capsule::STLVector(accessMode, m_RankMPI, m_DebugMode)}, - m_BP1Aggregator{format::BP1Aggregator(m_MPIComm, m_DebugMode)}, - m_MaxBufferSize{m_Buffer.m_Data.max_size()} + m_Buffer(accessMode, m_RankMPI, m_DebugMode), + m_BP1Aggregator(m_MPIComm, m_DebugMode), + m_MaxBufferSize(m_Buffer.m_Data.max_size()) { m_MetadataSet.TimeStep = 1; // starting at one to be compatible with ADIOS1.x Init(); diff --git a/source/transport/file/FStream.cpp b/source/transport/file/FStream.cpp index 2a404ae6a96a10471e5ccd97acd547617a73fdb0..bb7b851de06b514f316c256bd7a5265394005114 100644 --- a/source/transport/file/FStream.cpp +++ b/source/transport/file/FStream.cpp @@ -20,7 +20,7 @@ namespace adios namespace transport { -FStream::FStream(MPI_Comm mpiComm, bool debugMode) +FStream::FStream(MPI_Comm mpiComm, const bool debugMode) : Transport("fstream", mpiComm, debugMode) { }