NERSC / hpcpp

MIT License
7 stars 3 forks source link

No more std::cout, only fmt #9

Closed weilewei closed 7 months ago

weilewei commented 7 months ago

This PR is modernizing print process, no more std::cout and only fmt library which is the C++ print reference implementation. fmt significantly simplifies print process, improves performance (though our print is not in critical path), debugging in compile time, etc.

This PR touches tons of files, please do careful review and verification.

  1. introduced fmt & mdspan_formatter (a forked version with compilation fixes) into codebase
  2. move mdspan library from external to cpm package management since mdspan is used by default everywhere.
  3. use hpcpp-core to package fmt, mdspan_formatter, and mdspan libraries and pass it along to all apps
  4. add a fmt for std::complex where requires std::floating_point
  5. remove printVec since fmt does better job
  6. change a bunch of files

Note, prefixSum-stdexec has some weird operation when printing out out double array. Original code also has segfault when printing, not sure what to fix.

weilewei commented 7 months ago

Pleas review and approve @mhaseeb123. Thanks.