(LOW priority) Disable LBANN warning output during testing
I'm still not convinced I see the value of LBANN_WARNING at all, but we should be able to silence the warning.
Actual:
> ./unit_test/seq-catch-tests "[data_reader][synthetic]"
Filters: [data_reader][synthetic]
LBANN warning (/path/to/lbann/src/data_readers/data_reader_synthetic.cpp:106): Unknown data field foobar
LBANN warning (/path/to/lbann/src/data_readers/data_reader_synthetic.cpp:106): Unknown data field foobar
LBANN warning (/path/to/lbann/src/data_readers/data_reader_synthetic.cpp:106): Unknown data field foobar
===============================================================================
All tests passed (10779 assertions in 3 test cases)
Expected:
> ./unit_test/seq-catch-tests "[data_reader][synthetic]"
Filters: [data_reader][synthetic]
===============================================================================
All tests passed (10779 assertions in 3 test cases)
The output is superfluous and just adds clutter to the testing report.
LBANN_WARNING is basically a convenience wrapper for printing to stderr. I am resistant to adding logic to silence it, since its point is precisely to print on screen.
Here's the offending function: https://github.com/LLNL/lbann/blob/a38bd964f6df6f47223434fac2b121e50750180c/src/data_readers/data_reader_synthetic.cpp#L104 I think it would be cleaner to split it into two functions: one function to query whether the data field is valid (no printed output) and one function to fetch the data (throw an exception if the data field is invalid).
Consider GPU runtimes' logging features: log levels are used to suppress output when nobody cares (e.g., during testing, when bad data may be passed to verify error handling) and redirection to files is available for regular use. We cannot simply redirect stderr because the testing application may use that to report actually important information.
A longer term, albeit somewhat cross-cutting, solution to this would be to build out the logging interface that I've always wanted for LBANN. From the point of view as "LBANN as a library", this is the right way to go -- the default streams belong to the application and while they're fine defaults, the should be overrideable.