-
Notifications
You must be signed in to change notification settings - Fork 77
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
GR backend interaction with system libraries #540
Comments
I have no idea, why this happens. I don't think, that there are name conflicts ( Could please find the missing library ( otool -L <path from above find command>libgurobi100.dylib You could also try to run the |
For some reason I cannot find the Gurobi library in my artifacts folder (or any eetureijonen@Eetus-MacBook-Air artifacts % find ~/.julia/artifacts -type f \( -name "*gurobi*" -a -name "*.dylib" \)
I found it in my eetureijonen@Eetus-MacBook-Air lib % otool -L /Library/gurobi1001/macos_universal2/lib/libgurobi100.dylib
/Library/gurobi1001/macos_universal2/lib/libgurobi100.dylib (architecture x86_64):
/Library/gurobi1001/macos_universal2/lib/libgurobi100.dylib (compatibility version 10.0.0, current version 10.0.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1109.60.2)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59754.60.13)
/Library/gurobi1001/macos_universal2/lib/libgurobi100.dylib (architecture arm64):
/Library/gurobi1001/macos_universal2/lib/libgurobi100.dylib (compatibility version 10.0.0, current version 10.0.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1109.60.2)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59754.60.13) |
export DYLD_LIBRARY_PATH="/Library/gurobi1001/macos_universal2/lib:${DYLD_LIBRARY_PATH}"
julia ... |
Thank you, this seems to solve the acute problem for me. eetureijonen@Eetus-MacBook-Air examples % export DYLD_LIBRARY_PATH="/Library/gurobi1001/macos_universal2/lib:${DYLD_LIBRARY_PATH}"
eetureijonen@Eetus-MacBook-Air examples % julia --project
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.1 (2023-06-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Plots
julia> gr()
Plots.GRBackend()
julia> plot()
julia> using Distributed
julia> addprocs(4)
4-element Vector{Int64}:
2
3
4
5
julia> @everywhere begin
using Gurobi
Gurobi.Env()
end
Set parameter Username
Academic license - for non-commercial use only - expires 2024-05-21
From worker 2: Set parameter Username
From worker 3: Set parameter Username
From worker 3: Academic license - for non-commercial use only - expires 2024-05-21
From worker 2: Academic license - for non-commercial use only - expires 2024-05-21
From worker 5: Set parameter Username
From worker 4: Set parameter Username
From worker 5: Academic license - for non-commercial use only - expires 2024-05-21
From worker 4: Academic license - for non-commercial use only - expires 2024-05-21 However, I think there is still something going on as other backends do not cause the same issue. |
Hi, I have run into a weird issue when trying to use Plots.jl with GRBackend and Gurobi.jl (the optimization solver) with multiple workers.
The minimal working example is here:
This code will produce an error, which, according to my understanding, indicates that the Gurobi library/program cannot be found.
However, by using a different backend (e.g. PyPlot), the code works just fine:
Output:
I'm using Julia version 1.9.1, Plot.jl v1.39.0, Gurobi.jl v1.2.1 on a Macbook M2 Air with macOS 14.2
Could this issue be caused by some kind of alteration to the system environment before it's passed to the workers? Or possibly a namespace conflict (Gurobi is also abbreviated GR in some contexts)?
The text was updated successfully, but these errors were encountered: