Skip to content

Fix FAST_ExtInfw_Restart API#2776

Merged
andrew-platt merged 1 commit intoOpenFAST:rc-4.0.4from
marchdf:fix-restart
Apr 25, 2025
Merged

Fix FAST_ExtInfw_Restart API#2776
andrew-platt merged 1 commit intoOpenFAST:rc-4.0.4from
marchdf:fix-restart

Conversation

@marchdf
Copy link
Contributor

@marchdf marchdf commented Apr 25, 2025

The C++ function declaration had an extra argument InflowType, that is not present in the Fortran function definition.

The C++ function declaration had an extra argument InflowType, that
is not present in the Fortran function definition.
Copy link
Collaborator

@andrew-platt andrew-platt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching this! We'll get this into 4.1.0

@andrew-platt andrew-platt changed the base branch from dev to rc-4.0.4 April 25, 2025 17:31
@andrew-platt andrew-platt self-assigned this Apr 25, 2025
@andrew-platt andrew-platt added this to the v4.0.4 milestone Apr 25, 2025
@andrew-platt
Copy link
Collaborator

Longer description from @marchdf:

Short story: on calling that restart function, we got invalid returns in the C++. num_blades would be ridiculous, the error code nonsensical (like ierr = 538976256)

We wrap OF function calls with a function that check the error id. It was returning a wild error ID and so we were aborting. But it didn't have a message attached (which it would if it error "properly"). So then I started printing the error code in the fortran code and in the c++ code and they didn't match. And then I noticed that we were somehow getting 19 blades returned in the c++ whereas the fortran was saying there were 3. So I thought it was some kind of memory corruption. I took another look at the function signature in the fortran and got really confused that amr-wind had the extra inflow argument in the amr-wind function call. I couldn't understand why we would have it if it wasn't in the function definition. So I removed it and then compilation broke. More confusion. And then I compared it to the c++ function declaration and noticed that the arguments didn't match in the declaration and definition. It was a process 🙃

@andrew-platt andrew-platt merged commit d66ab68 into OpenFAST:rc-4.0.4 Apr 25, 2025
44 checks passed
@marchdf marchdf deleted the fix-restart branch April 25, 2025 19:32
@andrew-platt andrew-platt mentioned this pull request Apr 28, 2025
35 tasks
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.

2 participants