axom icon indicating copy to clipboard operation
axom copied to clipboard

Slic's LoggerStream should not require an ostream in the constructor

Open kennyweiss opened this issue 3 years ago • 1 comments

The ostream is only used by the root rank, but is required for all ranks. We shouldn't need to create an ostream on ranks that it is not used. This is especially problematic for fstreams.

@white238 has a WIP branch for this:

  • https://github.com/LLNL/axom/compare/bugfix/white238/parallel_slic_example

Possibilities to resolve this:

  • we can break this out into two constructors -- one that takes an ostream and one that does not,
  • we can allow a nullptr for the ostream instance, and modify the class to deal with a nullptr
  • we can remove the ostream from the constructor and add a function to set the ostream pointer.

kennyweiss avatar Apr 12 '21 19:04 kennyweiss

I prefer the 3rd option above.

rhornung67 avatar Mar 04 '22 21:03 rhornung67