Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HiGHS Log File Not Found/Created #739

Open
4 of 15 tasks
jlalbers opened this issue Mar 11, 2024 · 5 comments
Open
4 of 15 tasks

HiGHS Log File Not Found/Created #739

jlalbers opened this issue Mar 11, 2024 · 5 comments

Comments

@jlalbers
Copy link

Details for the issue

What did you do?

Modeled a MILP problem with PuLP and attempted to solve with the HiGHS_CMD solver. Defined a basic problem and solver as follows:

import pulp as pl

prob = pl.LpProblem("Name", pl.LpMaximize)
solver = pl.HiGHS_CMD()
...
result = prob.solve(solver)
print(result)

What did you expect to see?

I expected to see the result assigned to result and printed to the command line.

What did you see instead?

I get a FileNotFoundError with the following message:
[Errno 2] No such file or directory: '/var/folders/qc/sgm9_xyx4t7c_t01c_1klnkc0000gn/T/df3e5a7bf9d04d15b4bba49ee31da6f5-pulp.HiGHS_log'

I checked the directory and found the equivalent .mps and .HiGHS files, but the HiGHS_log file was not created.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: 14.2.1)
  • Other: ___

I'm using python version:

  • 3.7
  • 3.8
  • 3.9
  • 3.10
  • 3.11
  • Other: 3.12

I installed PuLP via:

Did you also

@RicardoEGFSilva
Copy link

I'm facing the exact same issue apart from using Windows. Have you found a solution for this problem in the meantime?

@pchtsp
Copy link
Collaborator

pchtsp commented Mar 21, 2024

Thanks for reporting. Unfortunately, I cannot reproduce this error as we do not have HiGHS_CMD in the CI.

Is there any instructions to download and install highs?
Extra points if it's cross-platform and does not require user interaction.

@jlalbers
Copy link
Author

@pchtsp for the command line version, you can download a pre-compiled binary or build it from source with CMake:

https://ergo-code.github.io/HiGHS/dev/installation/

@DavideTr8
Copy link

DavideTr8 commented Apr 12, 2024

Hi! I had the same problem in Linux (Ubuntu) and to me it was solved by running
sudo ldconfig
in the terminal after installing HiGHS.

I don't know for other OS, but maybe this can help someone else with the same issue on Linux

@gamcorn
Copy link

gamcorn commented Oct 14, 2024

Hello !
I faced the same problem. The issue seems to come from a bad linking of the HiGHS libraries. I compiled using the advice at THIS LINK using the flag -DBUILD_SHARED_LIBS=OFF and now the error is gone. This is equivalent to what @DavideTr8 suggested but in my case ldconfig was not updating the links. However, it would be great if Pulp could check highs is called since there is an error reported by highs if called manually highs: error while loading shared libraries: libhighs.so.1: cannot open shared object file: No such file or directory

I am running HiGHS and Pulp on python3.12 official debian docker image.

@pchtsp if you want to add HiGHS checks to the CI, I am using this Dockerfile to build the base image for the runners on my application:

FROM python:3.12-bookworm AS base

RUN set -ex;         \
    apt-get update;  \
    apt-get install -y git g++ gcc curl cmake; \
    git clone https://github.com/ERGO-Code/HiGHS.git

FROM base AS compiler

RUN set -ex;              \
    cd HiGHS;             \
    mkdir build;          \
    cmake -DBUILD_SHARED_LIBS=OFF -B build;       \
    cmake --build build;  \
    cd build;             \
    make;                 \
    make install

FROM base AS runtime

COPY --from=compiler /usr/local/bin /usr/local/bin

ENTRYPOINT [""]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants