Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

installed but julia doesn't recognize it. #29

Open
rayset opened this issue Apr 18, 2017 · 12 comments
Open

installed but julia doesn't recognize it. #29

rayset opened this issue Apr 18, 2017 · 12 comments

Comments

@rayset
Copy link

rayset commented Apr 18, 2017

I have a fresh julia install, and I'm trying to use JuliaOpt.

if I run my code I get this error:

ERROR: LoadError: CoinOptServices not installed. Please run
Pkg.add("CoinOptServices")
 in #BonminNLSolver#74(::String, ::Function, ::Array{String,1}) at \.julia\v0.5\AmplNLWriter\src\AmplNLWriter.jl:39
 in reconfigurationDynamic(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Int64,2}, ::Array{Int64,2}, ::Array{Int64,2}, ::Int64, ::Array{Float64,2}, ::Array{Float64,1}, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,2}, ::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Int64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Int64,1}) at reconfAlgorithm.jl:4
 in macro expansion; at main.jl:99 [inlined]
 in anonymous at .\<missing>:?
 in include_from_node1(::String) at .\loading.jl:488
while loading main.jl, in expression starting on line 83` (I edited the file paths).

Running Pkg.add("CoinOptServices") I get INFO: Nothing to be done.

other useful outputs:

Pkg.status("CoinOptServices")
 - CoinOptServices               0.2.0
Pkg.test("CoinOptServices")
INFO: Computing test dependencies for CoinOptServices...
INFO: No packages to install, update or remove
INFO: Testing CoinOptServices


Optimization Services Solver
Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin
Distributed under the Eclipse Public License
OS Version:  2.9.2


ERROR: LoadError: failed process: Process(`'C:\Users\Alessandro\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\..\bin\OSSolverService' -osil 'C:\Users\Alessandro\.julia\v0.5\CoinOptServices\.osil\problem.osil' -osol 'C:\Users\Alessandro\.julia\v0.5\CoinOptServices\.osil\options.osol' -osrl 'C:\Users\Alessandro\.julia\v0.5\CoinOptServices\.osil\results.osrl' -printLevel 1`, ProcessExited(3221225477)) [3221225477]
 in pipeline_error(::Base.Process) at .\process.jl:616
 in run(::Cmd) at .\process.jl:592
 in optimize!(::CoinOptServices.OsilMathProgModel) at C:\Users\Alessandro\.julia\v0.5\CoinOptServices\src\CoinOptServices.jl:563
 in optimize!(::CoinOptServices.OsilNonlinearModel) at C:\Users\Alessandro\.julia\v0.5\CoinOptServices\src\probmod.jl:409
 in #solvenlp#162(::Bool, ::Function, ::JuMP.Model, ::JuMP.ProblemTraits) at C:\Users\Alessandro\.julia\v0.5\JuMP\src\nlp.jl:1271
 in (::JuMP.#kw##solvenlp)(::Array{Any,1}, ::JuMP.#solvenlp, ::JuMP.Model, ::JuMP.ProblemTraits) at .\<missing>:0
 in #solve#109(::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::JuMP.Model) at C:\Users\Alessandro\.julia\v0.5\JuMP\src\solvers.jl:170
 in solve(::JuMP.Model) at C:\Users\Alessandro\.julia\v0.5\JuMP\src\solvers.jl:148
 in include_from_node1(::String) at .\loading.jl:488
 in process_options(::Base.JLOptions) at .\client.jl:265
 in _start() at .\client.jl:321
while loading C:\Users\Alessandro\.julia\v0.5\CoinOptServices\test\runtests.jl, in expression starting on line 23
==============================================[ ERROR: CoinOptServices ]==============================================

failed process: Process(`'C:\Users\Alessandro\AppData\Local\Julia-0.5.1\bin\julia' -Cx86-64 '-JC:\Users\Alessandro\AppData\Local\Julia-0.5.1\lib\julia\sys.dll' --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes 'C:\Users\Alessandro\.julia\v0.5\CoinOptServices\test\runtests.jl'`, ProcessExited(1)) [1]

======================================================================================================================
INFO: Removing FactCheck v0.4.3
INFO: Removing OffsetArrays v0.3.0
ERROR: CoinOptServices had test errors
 in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at .\pkg\entry.jl:749
 in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at .\<missing>:0
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at .\pkg\dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at .\file.jl:48
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at .\pkg\dir.jl:31
 in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at .\<missing>:0
 in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at .\pkg\pkg.jl:258
 in test(::String, ::Vararg{String,N}) at .\pkg\pkg.jl:258
@blegat
Copy link
Member

blegat commented Apr 18, 2017

Could you provide the value of Pkg.dir("CoinOptServices") and isdir(Pkg.dir("CoinOptServices")) ?

@rayset
Copy link
Author

rayset commented Apr 18, 2017

Thanks for the quick reply:

julia> Pkg.dir("CoinOptServices")
"C:\\Users\\Alessandro\\.julia\\v0.5\\CoinOptServices"

julia> isdir(Pkg.dir("CoinOptServices"))
true

I'm on windows 10. haven't add julia's directry to my path, but I don't think this is relevant.

@blegat
Copy link
Member

blegat commented Apr 18, 2017

This is weird. Look here and here. If osl is true then it shouldn't print this error.
Could you print Pkg.dir("CoinOptServices"), isdir(Pkg.dir("CoinOptServices")) and osl in the BonminNLSolver function just before the error is thrown ?

@rayset
Copy link
Author

rayset commented Apr 18, 2017

this is the result calling in my code just before the function that requires the package:

C:\Users\Alessandro\.julia\v0.5\CoinOptServices
true

I added the following to AmplNLWriter.jl (and rebuilt the CoinOptServices package) but I don't get any output from it:

    temp=Pkg.dir("CoinOptServices")
    println("$temp")
    temp=(isdir(Pkg.dir("CoinOptServices")))
    println("$temp")
    print($osl)

@blegat
Copy link
Member

blegat commented Apr 18, 2017

I just noticed in the error message of your first post:

in #BonminNLSolver#74(::String, ::Function, ::Array{String,1}) at \.julia\v0.5\AmplNLWriter\src\AmplNLWriter.jl:39

You have two installation of Julia. One in \.julia\v0.5 and one in C:\Users\Alessandro\.julia\v0.5. CoinOptServices is installed in the second one and you use AmplNLWriter from the first one.

@rayset
Copy link
Author

rayset commented Apr 18, 2017 via email

@rayset
Copy link
Author

rayset commented May 2, 2017

Hello there, sorry for the delay.

I installed everything in a new virtual machine and I still get the error.

ERROR: LoadError: CoinOptServices not installed. Please run
Pkg.add("CoinOptServices")
 in #BonminNLSolver#74(::String, ::Function, ::Array{String,1}) at /home/labreti/.julia/v0.5/AmplNLWriter/src/AmplNLWriter.jl:39
 in argmin_Vk(::Int64, ::Array{Float64,1}, ::Array{Float64,1}, ::Int64, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,2}, ::Array{Float64,3}, ::Array{Float64,1}, ::Array{Float64,2}) at /home/labreti/CODICE/argmin_Vk.jl:34
 in macro expansion; at /home/labreti/CODICE/main.jl:89 [inlined]
 in anonymous at ./<missing>:?
 in include_from_node1(::String) at ./loading.jl:488
while loading /home/labreti/CODICE/main.jl, in expression starting on line 77
julia> Pkg.dir("CoinOptServices")
"/home/labreti/.julia/v0.5/CoinOptServices"

julia> isdir(Pkg.dir("CoinOptServices"))
true

It doesn't seem that I have two installations now...so what could I be missing?

I also get

Pkg.build("CoinOptServices")
INFO: Building Cbc
INFO: Building Ipopt
INFO: Building LightXML
INFO: Building CoinOptServices
WARNING: Method definition @checked_lib(ANY<:Any, ANY<:Any) in module __anon__ at /home/labreti/.julia/v0.5/Cbc/deps/deps.jl:7 overwritten at /home/labreti/.julia/v0.5/Ipopt/deps/deps.jl:7.


thanks again for the help

@rayset
Copy link
Author

rayset commented May 2, 2017

I fixed it, but I can confirm that every single installation of julia I did (versions from 0.4 to the latest nightly), on three different machines (2 windows, 1 ubuntu) had this exact problem.

here's the commands I gave from a fresh install (which come from JuliaOpt installation guidelines, so kinda typical):

Pkg.add("PyPlot")
Pkg.add("JuMP")
Pkg.add("Cbc")
Pkg.add("AmplNLWriter")
Pkg.add("CoinOptServices")

This in some way breaks the package.

I tried giving

Pkg.add("CoinOptServices")
Pkg.add("PyPlot")
Pkg.add("JuMP")
Pkg.add("AmplNLWriter")

and it works. Maybe it was Pkg.add("Cbc") or even the order to break it... I'll leave this open hoping someone figures out.

@philipithomas
Copy link

I'm running into this same problem. Will post a follow-up if I find a fix. The race condition on installs may be it, though.

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

What version of Julia are you using?

@philipithomas
Copy link

philipithomas commented Jun 2, 2017

@tkelman 0.5.1. I wiped out ~/.julia to try again and got the same issue.

I'll update to 0.5.2 now and try it.

@ccoffrin
Copy link
Contributor

ccoffrin commented Sep 6, 2017

I had the same issue doing a fresh install in 0.5.2. It seemed to be resolved by removing the CoinOptServices and AmplNLWriter packages and then reinstalling them, with CoinOptServices coming first.

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

No branches or pull requests

5 participants