Skip to content

Conversation

@amontoison
Copy link
Member

@jfowkes @nimgould
The new release of SIFDecode broke CUTEst.jl because STOP 0 is written in stderr and not stdout.
I was checking that stderr was empty before.
This PR quickly fixes the issue.

It could be relevant for you to know that if you want to use it in the Python interface.

@amontoison amontoison added the bug label Oct 1, 2025
@amontoison amontoison changed the title Update CUTEst.jl for the SIFDecode 3.1.0 Update CUTEst.jl for SIFDecode 3.1.0 Oct 1, 2025
@amontoison amontoison merged commit 6c92f9f into main Oct 1, 2025
19 checks passed
@amontoison amontoison deleted the sifdecode_upgrade branch October 1, 2025 01:13
@jfowkes
Copy link

jfowkes commented Oct 1, 2025

Thanks @amontoison, this is why it's so annoying that gfortran added support for QUIET so late.

It doesn't seem to be an issue for the Python interface as it checks the return code.

@nimgould
Copy link

nimgould commented Oct 1, 2025

The fortran standard is rather vague about this, but I now believe

STOP

gives status = 0, but does not output a message

STOP code

gives status = exit, written to standard error. Thus I propose that we have

IF ( status == 0 ) THEN
STOP
ELSE
WRITE( out, &
"( /, ' Error exit from decoding stage. terminating execution.' )" )
STOP status
END IF

Any feelings or objections?

https://www.cita.utoronto.ca/~merz/intel_f10b/main_for/mergedProjects/lref_for/source_files/rfstop.htm#:~:text=If%20stop%2Dcode%20is%20specified,to%20stop%2Dcode%20is%20returned.

@jfowkes
Copy link

jfowkes commented Oct 1, 2025

Ah so this would avoid echoing STOP 0, seems like a sensible change to me. I'll shout if anything breaks.

@nimgould
Copy link

nimgould commented Oct 1, 2025

Another thing, although we pass a code using STOP, it is equally valid to pass a string (which is then echoed). Indeed, I suspect that the code is actually passed as a string ... I'm not suggesting we do, but it would be more friendly than simply getting a final "STOP 3" message.

@jfowkes
Copy link

jfowkes commented Oct 1, 2025

So long as the return codes don't change I'm happy.

@nimgould
Copy link

nimgould commented Oct 1, 2025

I presume that the MACOS actions machine is down, as all MAC jobs time out waiting for a server. Is this the US Gov shutdown in action?

@jfowkes
Copy link

jfowkes commented Oct 1, 2025

That seems likely!

@amontoison
Copy link
Member Author

The fortran standard is rather vague about this, but I now believe

STOP

gives status = 0, but does not output a message

STOP code

gives status = exit, written to standard error. Thus I propose that we have

IF ( status == 0 ) THEN STOP ELSE WRITE( out, & "( /, ' Error exit from decoding stage. terminating execution.' )" ) STOP status END IF

Any feelings or objections?

https://www.cita.utoronto.ca/~merz/intel_f10b/main_for/mergedProjects/lref_for/source_files/rfstop.htm#:~:text=If%20stop%2Dcode%20is%20specified,to%20stop%2Dcode%20is%20returned.

I approve theses modifications 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants