Skip to content

Commit

Permalink
Tidy some of the start up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertnash committed May 20, 2024
1 parent 57f2017 commit ebce493
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 1 addition & 5 deletions Code/geometry/GeometryReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ namespace hemelb::geometry
);
}

log::Logger::Log<log::Info, log::Singleton>("Opened geometry file %s", dataFilePath.c_str());
// TODO: Why is there this fflush?
fflush(nullptr);

log::Logger::Log<log::Debug, log::OnePerCore>("Reading file preamble");
GmyReadResult geometry = ReadPreamble();

Expand Down Expand Up @@ -320,7 +316,7 @@ namespace hemelb::geometry
constexpr auto MiB = std::size_t(1) << 20;
constexpr std::size_t MAX_GMY_BUFFER_SIZE = 64U * MiB;

log::Logger::Log<log::Info, log::Singleton>("Buffering compressed site data onto owning processes.");
log::Logger::Log<log::Info, log::Singleton>("Streaming geometry data and caching required blocks.");
log::Logger::Log<log::Debug, log::Singleton>("Maximum buffer size %lu B", MAX_GMY_BUFFER_SIZE);

block_cache ans;
Expand Down
12 changes: 9 additions & 3 deletions Code/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ int main(int argc, char *argv[])
net::MpiCommunicator commWorld = net::MpiCommunicator::World();

net::IOCommunicator hemelbCommunicator(commWorld);
try
{
log::Logger::Log<log::Info, log::Singleton>(
"Initialised MPI: %d nodes x %d processes per node = %d total",
hemelbCommunicator.GetLeadersComm().Size(),
hemelbCommunicator.GetNodeComm().Size(),
hemelbCommunicator.Size()
);

try {
// Parse command line
configuration::CommandLine options = configuration::CommandLine(argc, argv);
auto options = configuration::CommandLine(argc, argv);

// Start the debugger (if requested)
debug::Init(options.GetDebug(), argv[0], commWorld);
Expand Down

0 comments on commit ebce493

Please sign in to comment.