Skip to content

Command line output when using HiGHS as a library #1344

@Dekker1

Description

@Dekker1

I recently bumped into an issue that HiGHS outputs information to std::cout when it is used (by MiniZinc) as a library. This interferes with our other tools that in certain mode expect all output on std::cout to be in JSON format.

In this case it turned out to be the code here: https://github.com/ERGO-Code/HiGHS/blob/master/src/simplex/HEkkPrimal.cpp#L115C12-L126, but I wonder whether there should be a more general look at the usage of print statements in HiGHS: e.g., https://github.com/search?q=repo%3AERGO-Code%2FHiGHS%20printf&type=code. Are the remaining results shielded from being executed in library mode?

Additionally, I wonder why the value set using setLogCallback isn't used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions