From ba774817ecb2850da241345c1c63e4d82a3418c1 Mon Sep 17 00:00:00 2001 From: Norbert Podhorszki Date: Thu, 23 May 2024 14:52:30 -0400 Subject: [PATCH] Apply manually Greg's fix for windows to compile the hdf5SubFile example. Original fix is found in PR #4167 to master. --- examples/hello/hdf5SubFile/hdf5SubFile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/hello/hdf5SubFile/hdf5SubFile.cpp b/examples/hello/hdf5SubFile/hdf5SubFile.cpp index a018267b1a..3c51389ea3 100644 --- a/examples/hello/hdf5SubFile/hdf5SubFile.cpp +++ b/examples/hello/hdf5SubFile/hdf5SubFile.cpp @@ -14,7 +14,9 @@ #include //std::cout #include #include //std::invalid_argument std::exception +#ifndef _MSC_VER #include +#endif #include void writeMe(adios2::IO &hdf5IO, int rank, int size, const char *testFileName) @@ -34,8 +36,8 @@ void writeMe(adios2::IO &hdf5IO, int rank, int size, const char *testFileName) const std::size_t Nx = 1024; const std::size_t Ny = 1024 * scale; - std::vector myFloats(Nx * Ny, 0.1 * rank); - std::vector myInts(Nx * Ny, 1 + rank); + std::vector myFloats(Nx * Ny, 0.1f * rank); + std::vector myInts(Nx * Ny, (int)(1 + rank)); hdf5IO.SetParameter("IdleH5Writer", "true"); // set this if not all ranks are writting @@ -101,7 +103,7 @@ void ReadVarData(adios2::IO h5IO, adios2::Engine &h5Reader, const std::string &n if (var) { - int nDims = var.Shape().size(); + int nDims = (int)var.Shape().size(); size_t totalSize = 1; for (int i = 0; i < nDims; i++) {