What else than PATH solver for linear or mixed complementarity problem (LCP/MCP)?

What else than PATHSolver.jl is available in Julia for linear or mixed complementarity problem (LCP/MCP)? Within JuMP or outside it.

The thing is that The PATH Solver binaries are still not available for Apple M processors and I am becoming less optimistic that they will be any time soon…

Knitro, reportedly, can handle complementarity constraints, but I still have not got the license. Anything else out there?

Sure I can always use the Rosetta version of Julia. It is just that if it is because of a single missing package, I feel reluctant. Furthermore, I am quite good at messing things up while having several versions of this and that on my machine, that is why I like to keep just one Julia.

1 Like

PATH supports M1. (The issue you linked is closed because i fixed it.)

Do you have a reproducible example of it not working?

1 Like

Oops, I feel stupid then. Well, I kept visiting their (The PATH Solver) webpage and since those zip archives such as path_5.0.05_macOS.zip kept acquiring no silicon versions of the libraries, I concluded that they are still not available.

The only thing that helps me recover from the embarrassment is knowing that finally I can start exploring complementarity constraints in Julia :slight_smile:

Anyway, this is what I get after just installing PATHSolverj.jl (just the first few lines):

julia> using JuMP

julia> using PATHSolver

julia> model = Model(PATHSolver.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Error showing value of type Model:
ERROR: could not load library "/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib"
dlopen(/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib, 0x0001): tried: '/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib' (no such file), '/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib' (no such file)
Stacktrace:
  [1] c_api_Path_Version
    @ ~/.julia/packages/PATHSolver/QQzLy/src/C_API.jl:581 [inlined]

Indeed, my .Julia/datadeps/libpath50 directory is empty, while the README says

By default, PATHSolver.jl will download a copy of the underlying PATH solver.

Shall I file an issue here?

To fix this myself, I have returned to their website and indeed, the link to julia directory that I previously overlooked does contain silicon libraries (libpath50.silicon.dylib and liblusol.silicon.dylib). I downloaded them, set the PATH_JL_LOCATION to my new libpath50.silicon.dylib and things seem working now. Thanks.

I haven’t seen this issue before. It sounds like it might just have been a network issue. No need to open an issue…it’ll just be me replying.

Could you try restarting Julia?

Were there any errors in precompilation?

Can you reach http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib from your machine? (I guess so, because you downloaded them manually.)

1 Like

I tried all possible combinations of restarting Julia, uninstalling PATHSolver.jl and installing it again. Still the ~/.julia/datadeps/libpath50 directory is empty. No error messages in precompilation.

I also erased the ~/.julia/datadeps/libpath50 directory, it was empty after all (and uninstall/restart/install). It did not help. Maybe surprisingly the sister directory liblusol did contain something – liblusol.dylib, which I guess was for the Intel version.

And yes, of course I can reach the two silicon.dylib libraries on MF’s website.

Very weird. I just tried this and it works locally. What version of PATHSolver.jl do you have installed?

What is versioninfo()?

PATHSolver v1.7.1

julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores

I can also inform you that a colleague of mine with MacBook with M1 or M2 has just installed PATHSolver.jl package and confirmed to me that his ~/.Julia/datadeps remains empty.

Is this at your work? Is it a firewall issue? Does it work on your home network?

What is the output of

import DataDeps
DataDeps.register(
    DataDeps.DataDep(
        "libpath50",
        "The libpath50 binary from http://pages.cs.wisc.edu/~ferris",
        "http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib",
        "4e667615180565062013ab50a3968bbeddf3e510a9cdbfc27aa685152742b637",
    ),
)
DataDeps.datadep"libpath50"

I am actually sitting at home. It should not be a firewall issue. That colleague of mine tried the same from the university campus.

This is what I get with your code:

julia> import DataDeps

julia> DataDeps.register(
           DataDeps.DataDep(
               "libpath50",
               "The libpath50 binary from http://pages.cs.wisc.edu/~ferris",
               "http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib",
               "4e667615180565062013ab50a3968bbeddf3e510a9cdbfc27aa685152742b637",
           ),
       )
DataDeps.DataDep("libpath50", "http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib", "4e667615180565062013ab50a3968bbeddf3e510a9cdbfc27aa685152742b637", DataDeps.fetch_default, identity, "The libpath50 binary from http://pages.cs.wisc.edu/~ferris")

julia> DataDeps.datadep"libpath50"
This program has requested access to the data dependency libpath50.
which is not currently installed. It can be installed automatically, and you will not see this message again.

The libpath50 binary from http://pages.cs.wisc.edu/~ferris


Do you want to download the dataset from http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib to "/Users/hurak/.julia/datadeps/libpath50"?
[y/n]

y
┌ Info: Downloading
│   source = "http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib"
│   dest = "/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib"
│   progress = 1.0
│   time_taken = "0.02 s"
│   time_remaining = "0.0 s"
│   average_speed = "15.381 KiB/s"
│   downloaded = "252 bytes"
│   remaining = "0 bytes"
└   total = "252 bytes"
┌ Info: Downloading
│   source = "http://pages.cs.wisc.edu/~ferris/path/julia/libpath50.silicon.dylib"
│   dest = "/Users/hurak/.julia/datadeps/libpath50/libpath50.silicon.dylib"
│   progress = 1.0
│   time_taken = "1.65 s"
│   time_remaining = "0.0 s"
│   average_speed = "335.487 KiB/s"
│   downloaded = "553.219 KiB"
│   remaining = "0 bytes"
└   total = "553.219 KiB"
"/Users/hurak/.julia/datadeps/libpath50"

And does it work now? Is it inn the datadeps directory?

This is exactly the code that gets run, so I don’t understand why it would work in the REPL but not when you install:

Yep, it is there now:
➜ ~ ls .julia/datadeps/libpath50 libpath50.silicon.dylib

I have no idea what the problem is, and no idea how to debug this. From our side, everything seems to be working.

What happens if you delete the libpath50 directory, and then do:

] add PATHSolver#odow-patch-1
# Restart Julia
import PATHSolver
PATHSolver._install_datadeps()

It works. It downloads the correct libraries to the correct directory.

I can understand that debugging such issues is a pain, but let me emphasise that I am perfectly fine with the current state.

1 Like

I can only think that something happened when you switched from the Rosetta to native builds and BinDeps didn’t download the correct thing. No idea.

Happy that you’re able to use PATH now though. Let me know if anything else comes up.

1 Like