Unverified Commit 599d95be authored by Eisenhauer, Greg's avatar Eisenhauer, Greg Committed by GitHub
Browse files

Merge pull request #953 from pnorbert/fix_bcast

Fix bcast
parents 2d86df27 16425f11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,5 +2,5 @@
max-line-length = 80
max-complexity = 50
format = pylint
ignore = F403,F405,F999
ignore = F403,F405,F999,W504
exclude = thirdparty/
+13 −2
Original line number Diff line number Diff line
@@ -128,8 +128,19 @@ void BroadcastVector(std::vector<char> &vector, MPI_Comm mpiComm,
        vector.resize(inputSize);
    }

    MPI_Bcast(vector.data(), static_cast<int>(inputSize), MPI_CHAR, rankSource,
    const int MAXBCASTSIZE = 1073741824;
    size_t blockSize = (inputSize > MAXBCASTSIZE ? MAXBCASTSIZE : inputSize);
    size_t sent = 0;
    size_t pos = 0;
    char *buffer = vector.data();
    while (inputSize > 0)
    {
        MPI_Bcast(buffer, static_cast<int>(blockSize), MPI_CHAR, rankSource,
                  mpiComm);
        buffer += blockSize;
        inputSize -= blockSize;
        blockSize = (inputSize > MAXBCASTSIZE ? MAXBCASTSIZE : inputSize);
    }
}

// GatherArrays specializations
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ std::vector<std::string> LineToWords(const std::string &line)
bool isComment(std::string &s)
{
    bool comment = false;
    if (s[0] == '#' || s[0] == '%' || s[0] == '/')
    if (!s.compare(0, 1, "#") || !s.compare(0, 1, "%"))
    {
        comment = true;
    }
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ void Reorganize::Run()
    print0("Write method parameters = ", wmethodparams);

#ifdef ADIOS2_HAVE_MPI
    core::ADIOS adios(MPI_COMM_SELF, true, "C++");
    core::ADIOS adios(MPI_COMM_WORLD, true, "C++");
#else
    core::ADIOS adios(true, "C++");
#endif