-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use the Julia wrappers in CUTEst.jl -- Part I #333
Conversation
b3174fb
to
d1a3b37
Compare
Tests are not passing |
I know... |
57b7cff
to
7913eb2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
===========================================
- Coverage 89.11% 62.65% -26.47%
===========================================
Files 5 8 +3
Lines 790 1154 +364
===========================================
+ Hits 704 723 +19
- Misses 86 431 +345 ☔ View full report in Codecov by Sentry. |
97cbb72
into
JuliaSmoothOptimizers:main
|
||
CUTEstException(info::Integer) = CUTEstException(convert(Int32, info)) | ||
|
||
function cutest_error(status::Cint) # Handle nonzero exit codes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the macro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the macro was not applied to a parameter directly. It was checking a variable io_err
that is defined in the same scoop of variable but outside the macro. It can break for multiple reasons (scoop, name of the variable, etc...)
@@ -0,0 +1,283 @@ | |||
mutable struct CUTEstModel <: AbstractNLPModel{Float64, Vector{Float64}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did things change in this file? Since you move+modify it's really hard to see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the calls to fortran_close_
and fortran_open_
to just use the new wrappers.
I also changed vectors of one coefficient into references.
It requires less memory like this.
@@ -32,7 +32,6 @@ function main() | |||
code = replace(code, "Ptr{ip_}" => "Ptr{Cint}") | |||
code = replace(code, "Ptr{ipc_}" => "Ptr{Cint}") | |||
write(path, code) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted it without the space ;)
set_mastsif
is now insifdecoder.jl
CUTEstModel
is in a new filemodel.jl
.fortran_open_
andfortran_close_
.