Document print_configuration - #906
Conversation
Signed-off-by: Damien L-G <dalg24@gmail.com> Assisted-by: Claude:claude-4.5-sonnet
| * Useful for debugging and verifying the Kokkos build configuration and runtime settings | ||
| * The output includes both compile-time and runtime information: | ||
|
|
||
| * **Compile-time**: Enabled execution spaces, memory spaces, compiler information, and feature flags | ||
| * **Runtime**: Number of threads (for host parallel backends like OpenMP, Threads), number of visible devices and device ID in use (for device backends like CUDA, HIP, SYCL) |
There was a problem hiding this comment.
This is kind of a repetition of what was said at the top in the Usage section
There was a problem hiding this comment.
What change would you like to see?
There was a problem hiding this comment.
I would just remove it. The info does not have to be twice on the page
There was a problem hiding this comment.
Which would you remove? This one goes more into "detail".
There was a problem hiding this comment.
this one here. Since we do not give any promises about what it contains or how it is formatted, I would just leave it at "Useful for debugging and verifying the Kokkos build configuration"
| * **Compile-time**: Enabled execution spaces, memory spaces, compiler information, and feature flags | ||
| * **Runtime**: Number of threads (for host parallel backends like OpenMP, Threads), number of visible devices and device ID in use (for device backends like CUDA, HIP, SYCL) | ||
|
|
||
| * Must be called after :cpp:func:`Kokkos::initialize` to display runtime information |
There was a problem hiding this comment.
should we promote that to a warning?
There was a problem hiding this comment.
Sure.
Make the one below two bulleted points or separate block?
| Kokkos::initialize(argc, argv); | ||
|
|
||
| // Print basic configuration to the standard output | ||
| Kokkos::print_configuration(std::cout); | ||
|
|
||
| // Write vebose configuration to a log file | ||
| std::ofstream log_file("kokkos_config.log"); | ||
| if (log_file.is_open()) { | ||
| Kokkos::print_configuration(log_file, /*verbose=*/ true); | ||
| log_file.close(); | ||
| } | ||
|
|
||
| Kokkos::finalize(); |
There was a problem hiding this comment.
Should this also have the scope between initialize and finalize?
There was a problem hiding this comment.
I can add if you prefer. There is no Kokkos object so it is not technically needed.
Let me know if you want me to add it.
There was a problem hiding this comment.
Maybe we should add it for consistency? but I do not feel strong about this
| Kokkos::print_configuration(std::cout); | ||
| Kokkos::print_configuration(output_stream, /*verbose=*/ true); | ||
|
|
||
| Prints Kokkos configuration information ("bill of materials") to an output |
There was a problem hiding this comment.
I am not sure if bill of materials is a good thing to put here ... I would omit it
There was a problem hiding this comment.
Why not?
That was the claimed motivation to add it
kokkos/kokkos#632
and there is still a comment to that effect in the code
https://github.com/kokkos/kokkos/blob/dfa6599eb2d3277815cc2f406cc56cf66e02f85c/core/src/impl/Kokkos_RuntimeInfo.hpp#L11-L12
Is that misusing the terminology?
I thought it was on point, because it does spell out what Kokkos it is (version and configuration settings).
There was a problem hiding this comment.
I think it is too close to https://en.wikipedia.org/wiki/Software_supply_chain (SBOM)
I rather see it as a configuration of internal settings than a list of software that is used in Kokkos
Assisted-by: Claude:claude-4.5-sonnet
Close #888