Skip to content

Add SeaState path when running MoorDyn registry in RunRegistry.bat#2914

Merged
andrew-platt merged 1 commit intoOpenFAST:rc-4.1.2from
deslaughter:vs-md-registry-fix
Jul 9, 2025
Merged

Add SeaState path when running MoorDyn registry in RunRegistry.bat#2914
andrew-platt merged 1 commit intoOpenFAST:rc-4.1.2from
deslaughter:vs-md-registry-fix

Conversation

@deslaughter
Copy link
Collaborator

This PR is ready to be merged.

Feature or improvement description

This PR fixes an issue when running the registry for Visual Studio projects where the path to the SeaState registry files wasn't specified when running the MoorDyn registry. Since v4.0.0, MoorDyn has depended on SeaState and needs access to the registry files.

This appears to mainly affect users building with the IFX compiler as IFORT doesn't automatically regenerate the registry files when building, which is why the issue wasn't previously discovered.

Related issue, if one exists

Closes #2904

Impacted areas of the software

RunRegistry.bat which is used Visual Studio to run the registry and generate the module Types files.

This PR only affects users who build on Windows and use the Visual Studio projects.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the SeaState include path to the MoorDyn registry command so that SeaState dependencies are correctly located when running the registry under Visual Studio (especially with the IFX compiler).

  • Added -I "%SEAST_Loc%" to the MoorDyn registry invocation
  • Ensures SeaState registry files are found and included in module generation
Comments suppressed due to low confidence (2)

vs-build/RunRegistry.bat:258

  • [nitpick] Update the script's header comments or README to mention the new SEAST_Loc environment variable requirement so users know to set it before running the registry.
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%"  -I "%SEAST_Loc%" -O "%Output_Loc%"

vs-build/RunRegistry.bat:258

  • Add a check earlier in the script to verify that SEAST_Loc is defined and points to a valid directory, and exit with an error if not to avoid silent failures.
%REGISTRY% "%CURR_LOC%\%ModuleName%_Registry.txt" -I "%NWTC_Lib_Loc%"  -I "%SEAST_Loc%" -O "%Output_Loc%"

@andrew-platt andrew-platt merged commit da66d59 into OpenFAST:rc-4.1.2 Jul 9, 2025
25 checks passed
@bjonkman
Copy link
Contributor

bjonkman commented Jul 14, 2025

This appears to mainly affect users building with the IFX compiler as IFORT doesn't automatically regenerate the registry files when building

This statement caught my attention, @deslaughter. Are you saying the IFX compiler builds the registry files every time you build with the Visual Studio solution file? It's been my experience that IFORT automatically regenerates the registry files only if their dependency files have changed (e.g., if the Registry.txt file has a newer date/time than the corresponding *_Types.f90 file) or when you use "clean" or "rebuild" commands, which is my preferred behavior. I wouldn't want all of the Types.f90 files regenerated every time I made an unrelated change.

@andrew-platt andrew-platt mentioned this pull request Aug 5, 2025
37 tasks
@deslaughter deslaughter deleted the vs-md-registry-fix branch January 28, 2026 14:13
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.

Openfast compilation failed

4 participants