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

Updates to VersionInfo module and its dependencies #1124

Merged
merged 5 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/actions/tests-module-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'VersionInfo module tests'
description: 'Run tests specific to the NWTC Library module'
author: 'Rafael Mudafort https://github.com/rafmudaf'
runs:
using: "composite"
steps:
- run: ctest -VV -R versioninfo_utest
working-directory: ${{runner.workspace}}/openfast/build
shell: bash
6 changes: 6 additions & 0 deletions .github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ jobs:
working-directory: ${{runner.workspace}}/openfast/build
run: cmake --build . --target install -- -j ${{env.NUM_PROCS}}

# SubDyn has only regression tests
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn
# - name: Run AeroDyn tests
# uses: ./.github/actions/tests-module-aerodyn
# with:
# test-target: regression
# HydroDyn has only regression tests
- name: Run HydroDyn tests
uses: ./.github/actions/tests-module-hydrodyn
- name: Run InflowWind tests
Expand Down Expand Up @@ -333,8 +335,12 @@ jobs:
working-directory: ${{runner.workspace}}/openfast/build
run: cmake --build . --target unit_tests -- -j ${{env.NUM_PROCS}}

# NWTC Library has only unit tests
- name: Run NWTC Library tests
uses: ./.github/actions/tests-module-nwtclibrary
# VersionInfo has only unit tests
- name: Run VersionInfo tests
uses: ./.github/actions/tests-module-version
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
Expand Down
13 changes: 6 additions & 7 deletions modules/aerodyn/src/AeroDyn_Driver_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,15 @@ subroutine Dvr_Init(dvr, AD, IW, errStat,errMsg )

! --- Driver initialization
CALL NWTC_Init( ProgNameIN=version%Name )

InputFile = "" ! initialize to empty string to make sure it's input from the command line
CALL CheckArgs( InputFile, Flag=FlagArg )
IF ( LEN( TRIM(FlagArg) ) > 0 ) CALL NormStop()
! Display the copyright notice
call DispCopyrightLicense( version%Name )
! Obtain OpenFAST git commit hash
git_commit = QueryGitVersion()
! Tell our users what they're running
call WrScr( ' Running '//TRIM( version%Name )//' a part of OpenFAST - '//TRIM(git_Commit)//NewLine//' linked with '//TRIM( NWTC_Ver%Name )//NewLine )


! Display the copyright notice and compile info:
CALL DispCopyrightLicense( version%Name )
CALL DispCompileRuntimeInfo( version%Name )

! Read the AeroDyn driver input file
call Dvr_ReadInputFile(inputFile, dvr, errStat2, errMsg2 ); if(Failed()) return

Expand Down
2 changes: 1 addition & 1 deletion modules/aerodyn14/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set(DWM_SOURCES
)

add_executable(dwm_driver_wind_farm ${DWM_SOURCES})
target_link_libraries(dwm_driver_wind_farm aerodyn14lib)
target_link_libraries(dwm_driver_wind_farm aerodyn14lib versioninfolib)

install(TARGETS dwm_driver_wind_farm
RUNTIME DESTINATION bin
Expand Down
1 change: 1 addition & 0 deletions modules/aerodyn14/src/DWM_driver_wind_farm_sub.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MODULE DWM_driver_wind_farm_sub
USE NWTC_Library
USE VersionInfo
IMPLICIT NONE

!PUBLIC SUBROUTINES
Expand Down
2 changes: 1 addition & 1 deletion modules/feamooring/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ install(TARGETS feamlib
LIBRARY DESTINATION lib)

add_executable(feam_driver src/FEAM_Driver.f90)
target_link_libraries(feam_driver feamlib)
target_link_libraries(feam_driver feamlib versioninfolib)

install(TARGETS feam_driver
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
Expand Down
7 changes: 2 additions & 5 deletions modules/hydrodyn/src/HydroDyn_DriverCode.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,9 @@ PROGRAM HydroDynDriver
CALL CheckArgs( drvrFilename, Flag=FlagArg )
IF ( LEN( TRIM(FlagArg) ) > 0 ) CALL NormStop()

! Display the copyright notice
! Display the copyright notice and compile info:
CALL DispCopyrightLicense( version%Name )
! Obtain OpenFAST git commit hash
git_commit = QueryGitVersion()
! Tell our users what they're running
CALL WrScr( ' Running '//TRIM( version%Name )//' a part of OpenFAST - '//TRIM(git_commit)//NewLine//' linked with '//TRIM( NWTC_Ver%Name )//NewLine )
CALL DispCompileRuntimeInfo( version%Name )

! Parse the driver input file and run the simulation based on that file
CALL ReadDriverInputFile( drvrFilename, drvrInitInp, ErrStat, ErrMsg )
Expand Down
2 changes: 1 addition & 1 deletion modules/icefloe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ set(ICEFLOE_LIBS_SOURCES
)

add_library(icefloelib ${ICEFLOE_LIBS_SOURCES})
target_link_libraries(icefloelib nwtclibs)
target_link_libraries(icefloelib nwtclibs versioninfolib)

install(TARGETS icefloelib
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
Expand Down
4 changes: 2 additions & 2 deletions modules/inflowwind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ target_link_libraries(ifwlib nwtclibs)

# C-bound interface library
add_library(ifw_c_binding SHARED src/IfW_C_Binding.f90)
target_link_libraries(ifw_c_binding ifwlib)
target_link_libraries(ifw_c_binding ifwlib versioninfolib)
if(APPLE OR UNIX)
target_compile_definitions(ifw_c_binding PUBLIC -DIMPLICIT_DLLEXPORT)
endif()
Expand All @@ -65,7 +65,7 @@ set(IFW_DRIVER_SOURCES
)

add_executable(inflowwind_driver ${IFW_DRIVER_SOURCES})
target_link_libraries(inflowwind_driver ifwlib ${CMAKE_DL_LIBS})
target_link_libraries(inflowwind_driver ifwlib versioninfolib ${CMAKE_DL_LIBS})

install(TARGETS inflowwind_driver ifwlib ifw_c_binding
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
Expand Down
4 changes: 2 additions & 2 deletions modules/moordyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(MOORDYN_LIBS_SOURCES
)

add_library(moordynlib ${MOORDYN_LIBS_SOURCES})
target_link_libraries(moordynlib nwtclibs)
target_link_libraries(moordynlib nwtclibs versioninfolib)

install(TARGETS moordynlib
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
Expand All @@ -35,7 +35,7 @@ install(TARGETS moordynlib

set(MD_DRIVER_SOURCES src/MoorDyn_Driver.f90)
add_executable(moordyn_driver ${MD_DRIVER_SOURCES})
target_link_libraries(moordyn_driver moordynlib nwtclibs versioninfolib ${CMAKE_DL_LIBS})
target_link_libraries(moordyn_driver moordynlib nwtclibs ${CMAKE_DL_LIBS})

install(TARGETS moordyn_driver
RUNTIME DESTINATION bin
Expand Down
1 change: 1 addition & 0 deletions modules/moordyn/src/MoorDyn_Driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PROGRAM MoorDyn_Driver
USE MoorDyn_Types
USE MoorDyn
USE NWTC_Library
USE VersionInfo

IMPLICIT NONE

Expand Down
4 changes: 2 additions & 2 deletions modules/nwtc-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ add_library(nwtclibs ${NWTCLIBS_SOURCES})

if(BUILD_OPENFAST_SIMULINK_API)
find_package(Matlab REQUIRED)
target_link_libraries(nwtclibs versioninfolib ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS} ${Matlab_MEX_LIBRARY})
target_link_libraries(nwtclibs ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS} ${Matlab_MEX_LIBRARY})
else()
target_link_libraries(nwtclibs versioninfolib ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
target_link_libraries(nwtclibs ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
endif()

install(TARGETS nwtclibs
Expand Down
Loading