Skip to content

Commit

Permalink
Update src/NLPModelsKnitro.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 29, 2023
1 parent a7c148e commit 92607c1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/NLPModelsKnitro.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ else
end

function __init__()
KNITRO.__init__()
libiomp5 = replace(libknitro, "libknitro" => "libiomp5")
isfile(libiomp5) && Libdl.dlopen(libiomp5)
version = KNITRO.has_knitro() ? KNITRO.knitro_version() : v"0.0.0"
if version != v"0.0.0" && version < v"11.0"
error(

Check warning on line 21 in src/NLPModelsKnitro.jl

View check run for this annotation

Codecov / codecov/patch

src/NLPModelsKnitro.jl#L21

Added line #L21 was not covered by tests
"You have installed version $version of Artelys " *
"Knitro, which is not supported by KNITRO.jl. We require a " *
"Knitro version greater than 11.0.",
)
end
return
end

"""
Expand Down

0 comments on commit 92607c1

Please sign in to comment.