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

NWTC_IO: nullifying DLL (on restart) if not present when packing #1311

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

ebranlard
Copy link
Contributor

@ebranlard ebranlard commented Nov 2, 2022

This pull request ready to be merged

Feature or improvement description
When doing "restarts" using a checkpoint (I've tested it when using the -VTKLin option), OpenFAST exits with the error that that "the Orca Flex library could not be freed", even though Orca Flex was not used at all before or after the restart.

I'm using Windows, and gfortran 10.3. The check whether a library is freed (in SysGnuWin) is:(see here)

   IF ( DLL%FileAddr == INT(0,C_INTPTR_T) ) RETURN   

I've added nullifications of the C DLL pointers when "unpacking" a DLL_Type. I think that's a good idea to do so no matter what.

I think it could also be safe to add a initializer for the datatype (here )

      INTEGER(C_INTPTR_T)  :: FileAddr    = INT(0,C_INTPTR_T)

@bjonkman let me know your thoughts.

Impacted areas of the software
NWTC_IO

Test results, if applicable
No change, this is a restart, which I'm not sure we are testing.

@ebranlard ebranlard added this to the v3.4.0 milestone Nov 2, 2022
@bjonkman
Copy link
Contributor

bjonkman commented Nov 3, 2022

Looks good to me. Thanks for fixing this!

@ebranlard ebranlard merged commit 39d37e6 into OpenFAST:dev Nov 3, 2022
@ebranlard ebranlard deleted the f/nullifydll branch November 10, 2022 17:37
@rafmudaf rafmudaf mentioned this pull request Dec 19, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants