Skip to content

Conversation

@aliceb-nv
Copy link
Contributor

@aliceb-nv aliceb-nv commented Sep 3, 2025

closes #369

Most solvers report the version in their logs, along with some extra information such as build date or commit hash.

This PR adds code to cuopt_cli (and solve_MPS_problem, until we deprecate it) to print out the cuOpt version, build hash, and target architectures, along with host/device details when starting the solver.

Example output:

cuOpt version: 25.10.0, git hash: 9006ad7, host arch: x86_64, device archs: 90-real
CPU: AMD EPYC 7742 64-Core Processor, threads (physical/logical): 128/256, RAM: 726.66 GiB
CUDA 12.9, device: NVIDIA H100 PCIe (ID 0), VRAM: 79.18 GiB
CUDA device UUID: 1effffffa4ffffff9937-fffffff928-ffff

@aliceb-nv aliceb-nv added this to the 25.10 milestone Sep 3, 2025
@aliceb-nv aliceb-nv requested review from a team as code owners September 3, 2025 13:07
@aliceb-nv aliceb-nv added the non-breaking Introduces a non-breaking change label Sep 3, 2025
@aliceb-nv aliceb-nv requested a review from a team as a code owner September 3, 2025 13:07
@aliceb-nv aliceb-nv added the improvement Improves an existing functionality label Sep 3, 2025
return cores.size();
}

static std::string get_cpu_model_from_proc()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these functions to utilities. We would want to use these for all the solvers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've kept them in the cuopt_cli source file to keep them away from the main solver since this seems more like a CLI tool responsibility rather than a libcuopt one (and the duplication is a consequence of the legacy solve_MPS_file still being in the repo). Do you think this should be moved to the common solver code?

BTW we should probably discuss removing solve_MPS_file for good :) I've dragged my feet about it a little too long but the repo will benefit from lessened duplication

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log files can be generated from all other APIs (C, Python, service) as well right? If we restrict this to cli, the log files generated will be different.

With regards to removing the solve_MPS_file, yes I agree. We have a script to run the benchmarks (https://github.com/NVIDIA/cuopt/blob/branch-25.10/benchmarks/linear_programming/run_mps_files.sh). Its missing on gathering results, but now that you have the log file readers, that should be more than sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you're completely right, mea culpa :)
This makes sense. I will move this to solver side

return -1;
}

int device_id = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write a function, may be "PrintHardwareCudaCuOptInfos". This helps us calling from each solver easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above :)

Copy link
Collaborator

@rgsl888prabhu rgsl888prabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appoving Cmake changes

@rg20
Copy link
Contributor

rg20 commented Sep 5, 2025

/merge

@rapids-bot rapids-bot bot merged commit 11431c1 into branch-25.10 Sep 5, 2025
73 checks passed
aliceb-nv added a commit that referenced this pull request Sep 22, 2025
closes #369

Most solvers report the version in their logs, along with some extra information such as build date or commit hash.

This PR adds code to cuopt_cli (and solve_MPS_problem, until we deprecate it) to print out the cuOpt version, build hash, and target architectures, along with host/device details when starting the solver.

Example output:

```
cuOpt version: 25.10.0, git hash: 9006ad7, host arch: x86_64, device archs: 90-real
CPU: AMD EPYC 7742 64-Core Processor, threads (physical/logical): 128/256, RAM: 726.66 GiB
CUDA 12.9, device: NVIDIA H100 PCIe (ID 0), VRAM: 79.18 GiB
CUDA device UUID: 1effffffa4ffffff9937-fffffff928-ffff
```

Authors:
  - Alice Boucher (https://github.com/aliceb-nv)

Approvers:
  - Ramakrishnap (https://github.com/rgsl888prabhu)
  - Rajesh Gandham (https://github.com/rg20)

URL: #370
@rgsl888prabhu rgsl888prabhu deleted the log-version branch October 29, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Report solver version / hash in the log

4 participants