Skip to content
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

Starting point for "SROSENBR" differs from the .SIF file. #427

Open
NicolasL-S opened this issue Dec 9, 2024 · 2 comments
Open

Starting point for "SROSENBR" differs from the .SIF file. #427

NicolasL-S opened this issue Dec 9, 2024 · 2 comments

Comments

@NicolasL-S
Copy link
Contributor

This seems like a strange CUTEst bug, but I thought I would ask here just in case.

In the "ROSENBR" problem, the starting point is [-1.2, 1.0]. This is in agreement with the code in the file ROSENBR.SIF:

START POINT

ROSENBR X1 -1.2
ROSENBR X2 1.0

In the file SROSENBR.SIF, the starting point is defined with the following code

START POINT

DO I 1 N/2
IM 2I I 2
IA 2I-1 2I -1
X SROSENBR X(2I) 1.0
X SROSENBR X(2I-1) -1.2
ND

Hence, I would expect the starting point to be [-1.2, 1.0, -1.2, 1.0, -1.2, 1.0, -1.2, 1.0...]. But surprisingly, when I run the following code

using CUTEst
CUTEst_nlp = CUTEstModel("SROSENBR")
CUTEst_nlp.meta.x0

, I get the starting point

julia> CUTEst_nlp.meta.x0
5000-element Vector{Float64}:
 1.2
 1.0
 1.2
 1.0
 1.2
 1.0
 1.2
 1.0
...
@amontoison
Copy link
Member

amontoison commented Dec 9, 2024

We call the routine csetup in the Julia interface so I don't think that the bug is in CUTEst.jl.
I need to check if the issue is in the SIF decoder or in the Fortran routine.
@nimgould Do you have an idea of the culprit?

@nimgould
Copy link

nimgould commented Dec 9, 2024

Yup, it is a bug in the SIF file, the -1.2 is shifted one space to the left, and SIF requires numbers to lie between very specific field limits. Since tis file has been around since 1989, I guess we will have to live with this starting point, but as SIF allows more than one start, I'll add the correct one as a second. Thanks for reporting this

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

No branches or pull requests

3 participants