Skip to content

Commit

Permalink
Merge pull request #3104 from pnorbert/fix-bpls-version
Browse files Browse the repository at this point in the history
update bpls to print BP5 information correctly when using -V flag
  • Loading branch information
pnorbert authored Mar 14, 2022
2 parents c9181e5 + 786196d commit cf58acf
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions source/utils/bpls/bpls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,28 @@ bool introspectAsBPDir(const std::string &name) noexcept
char patch = buffer[34];
bool isBigEndian = static_cast<bool>(buffer[36]);
uint8_t BPVersion = static_cast<uint8_t>(buffer[37]);
bool isActive = static_cast<bool>(buffer[38]);

printf("ADIOS-BP Version %d %s - ADIOS v%c.%c.%c %s\n", BPVersion,
(isBigEndian ? "Big Endian" : "Little Endian"), major, minor, patch,
(isActive ? "- active" : ""));
bool isActive = false;
if (BPVersion == 4)
{
isActive = static_cast<bool>(buffer[38]);
printf("ADIOS-BP Version %d %s - ADIOS v%c.%c.%c %s\n", BPVersion,
(isBigEndian ? "Big Endian" : "Little Endian"), major, minor,
patch, (isActive ? "- active" : ""));
}
else if (BPVersion == 5)
{
uint8_t minversion = static_cast<uint8_t>(buffer[38]);
isActive = static_cast<bool>(buffer[39]);
printf("ADIOS-BP Version %d.%d %s - ADIOS v%c.%c.%c %s\n", BPVersion,
minversion, (isBigEndian ? "Big Endian" : "Little Endian"),
major, minor, patch, (isActive ? "- active" : ""));
}
else
{
printf("ADIOS-BP Version %d %s - ADIOS v%c.%c.%c %s\n", BPVersion,
(isBigEndian ? "Big Endian" : "Little Endian"), major, minor,
patch, (isActive ? "- active" : ""));
}

return true;
}
Expand Down

0 comments on commit cf58acf

Please sign in to comment.