GEOS-DEV / LvArray

Portable HPC Containers (C++)
BSD 3-Clause "New" or "Revised" License
48 stars 10 forks source link

Control verbosity of `LVARRAY_LOG` #331

Closed victorapm closed 1 month ago

victorapm commented 1 month ago

Would it make sense to add a runtime variable to turn off/on the output of LVARRAY_LOG?

https://github.com/GEOS-DEV/LvArray/blob/355e8d987fbf15c9ac07442bda28bc52a8e80480/src/Macros.hpp#L105

This would allow turning off messages appearing in GEOS logs like this:

Allocated    64.0 B to the HOST  : LvArray::Array<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1, camp::int_seq<long, 0l>, int, LvArray::ChaiBuffer> 
Allocated    64.0 B to the HOST  : LvArray::Array<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1, camp::int_seq<long, 0l>, int, LvArray::ChaiBuffer> 
Allocated    64.0 B to the HOST  : LvArray::Array<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 1, camp::int_seq<long, 0l>, int, LvArray::ChaiBuffer> 

which come from:

https://github.com/GEOS-DEV/LvArray/blob/355e8d987fbf15c9ac07442bda28bc52a8e80480/src/ChaiBuffer.hpp#L528-L532

corbett5 commented 1 month ago

You should be able to turn off this kind of logging directly in GEOS directly via a command line option.

victorapm commented 1 month ago

@corbett5 could you take a look at a possible solution linked to this issue (#333).

victorapm commented 1 month ago

Moving this issue to GEOS: https://github.com/GEOS-DEV/GEOS/issues/3366