Skip to content

Commit

Permalink
Fix MPI variable in utilities.cc from int to unsigned int.
Browse files Browse the repository at this point in the history
  • Loading branch information
MFraters committed Dec 10, 2024
1 parent 203a7d5 commit dd8ae54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/world_builder/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1183,14 +1183,14 @@ namespace WorldBuilder
MPI_Comm_rank(comm, &my_rank);
if (my_rank == 0)
{
int filesize;
unsigned int filesize;
std::ifstream filestream;
filestream.open(filename.c_str());
WBAssertThrow (filestream.is_open(), std::string("Could not open file <") + filename + ">.");

// Need to convert to unsigned int, because MPI_Bcast does not support
// size_t or const unsigned int
int invalid_file_size = -1;
unsigned int invalid_file_size = -1;

if (!filestream)
{
Expand Down

0 comments on commit dd8ae54

Please sign in to comment.