diff --git a/ebos/ecltracermodel.hh b/ebos/ecltracermodel.hh index 0887ac0a8..925ac3cdd 100644 --- a/ebos/ecltracermodel.hh +++ b/ebos/ecltracermodel.hh @@ -247,7 +247,7 @@ protected: size_t I = elemCtx.globalSpaceIndex(/*dofIdx=*/ 0, /*timIdx=*/0); size_t I1 = elemCtx.globalSpaceIndex(/*dofIdx=*/ 0, /*timIdx=*/1); - Scalar storageOfTimeIndex1[tr.numTracer()]; + std::vector storageOfTimeIndex1(tr.numTracer()); if (elemCtx.enableStorageCache()) { for (int tIdx =0; tIdx < tr.numTracer(); ++tIdx) { storageOfTimeIndex1[tIdx] = tr.storageOfTimeIndex1_[tIdx][I]; @@ -302,7 +302,7 @@ protected: if (well.getStatus() == Well::Status::SHUT) continue; - double wtracer[tr.numTracer()]; + std::vector wtracer(tr.numTracer()); for (int tIdx =0; tIdx < tr.numTracer(); ++tIdx) { wtracer[tIdx] = well.getTracerProperties().getConcentration(this->tracerNames_[tr.idx_[tIdx]]); } diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 6a5f91348..ce65481ba 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -23,6 +23,7 @@ #include "ParallelRestart.hpp" #include +#include #include #include #include @@ -1033,12 +1034,16 @@ template void unpack(std::vector<__VA_ARGS__>& data, \ std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); +INSTANTIATE_PACK_VECTOR(float) INSTANTIATE_PACK_VECTOR(double) INSTANTIATE_PACK_VECTOR(std::vector) INSTANTIATE_PACK_VECTOR(bool) INSTANTIATE_PACK_VECTOR(char) INSTANTIATE_PACK_VECTOR(int) -INSTANTIATE_PACK_VECTOR(size_t) +INSTANTIATE_PACK_VECTOR(unsigned char) +INSTANTIATE_PACK_VECTOR(unsigned int) +INSTANTIATE_PACK_VECTOR(unsigned long int) +INSTANTIATE_PACK_VECTOR(unsigned long long int) INSTANTIATE_PACK_VECTOR(std::time_t) INSTANTIATE_PACK_VECTOR(std::array) INSTANTIATE_PACK_VECTOR(std::pair) @@ -1062,14 +1067,17 @@ template void unpack(__VA_ARGS__& data, \ std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); +INSTANTIATE_PACK(float) INSTANTIATE_PACK(double) -INSTANTIATE_PACK(std::size_t) INSTANTIATE_PACK(bool) INSTANTIATE_PACK(int) +INSTANTIATE_PACK(unsigned char) +INSTANTIATE_PACK(unsigned int) +INSTANTIATE_PACK(unsigned long int) +INSTANTIATE_PACK(unsigned long long int) INSTANTIATE_PACK(std::array) INSTANTIATE_PACK(std::array) INSTANTIATE_PACK(std::array) -INSTANTIATE_PACK(unsigned char) INSTANTIATE_PACK(std::map,std::pair>) INSTANTIATE_PACK(std::optional) INSTANTIATE_PACK(std::optional)