Add SeaState path when running MoorDyn registry in RunRegistry.bat#2914
Conversation
There was a problem hiding this comment.
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%"
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. |
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.batwhich 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.