From 43eb5a2810e5796f9128c7f6f5cec380f3e72bf5 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 9 Dec 2020 13:05:15 -0600 Subject: [PATCH 1/5] Remove unused infrastructure config files --- .travis.yml | 70 ----------------------------------------------- CTestConfig.cmake | 19 ------------- 2 files changed, 89 deletions(-) delete mode 100644 .travis.yml delete mode 100644 CTestConfig.cmake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8010145f0f..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Travis CI configuration -# -# Environment info -# https://docs.travis-ci.com/user/reference/overview/ -# https://docs.travis-ci.com/user/reference/osx/ -# https://docs.travis-ci.com/user/reference/trusty/ - -language: c - -matrix: - include: - - os: linux - dist: bionic - env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=OFF - - os: linux - dist: bionic - env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=ON; CPP_API=ON; CMAKE_FLAGS="-DBUILD_OPENFAST_CPP_API=$CPP_API" - - os: linux - dist: bionic - env: FC=/usr/bin/gfortran-7; DOUBLE_PRECISION=ON; CPP_API=ON; CMAKE_FLAGS="-DBUILD_OPENFAST_CPP_API=$CPP_API -DGENERATE_TYPES=ON" - - os: osx - osx_image: xcode11 - env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=ON - - os: osx - osx_image: xcode11 - env: FC=/usr/local/bin/gfortran-7; DOUBLE_PRECISION=OFF - -# macos dependency install -addons: - homebrew: - packages: - - gcc@7 - - yaml-cpp - - hdf5 - - open-mpi - update: true - -before_install: - # linux configuration - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install gfortran libblas-dev liblapack-dev; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CPP_API" == "ON" ]]; then sudo apt-get install libopenmpi-dev libyaml-cpp-dev libhdf5-dev libxml2-dev; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.7.1; fi - - # common configuration - - pip3 install numpy - -install: - - mkdir build && cd build - - cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DDOUBLE_PRECISION=$DOUBLE_PRECISION $CMAKE_FLAGS - - cat CMakeCache.txt - - make -j4 install - -script: - # beamdyn unit tests - - if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -VV -R beamdyn_utest; fi - - # beamdyn regression tests - - if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -j4 -VV -R bd_; fi - - # linearization cases - - if [[ "$DOUBLE_PRECISION" == "ON" ]]; then ctest -L linear; fi - - # subset of openfast regression tests - # do not run - # - 3, 4, 7, 15, 16, 17 since the free yaw is not well trusted - # - 20, 21 because theyre too long - # THIS IS COMMENTED UNTIL TESTS CAN RELIABLY DETERMINE REGRESSION - # CURRENTLY, TESTS FAIL WITH VERY MINOR DIFFERENCES - # - ctest -VV -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26 - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ctest -j 18 -I 1,1,1,2,5,6,8,9,10,11,12,13,14,18,19,22,23,24,25,26 ; fi diff --git a/CTestConfig.cmake b/CTestConfig.cmake deleted file mode 100644 index 037686a5a5..0000000000 --- a/CTestConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -## This file should be placed in the root directory of your project. -## Then modify the CMakeLists.txt file in the root directory of your -## project to incorporate the testing dashboard. -## -## # The following are required to submit to the CDash dashboard: -## ENABLE_TESTING() -## INCLUDE(CTest) - -set(CTEST_PROJECT_NAME "openfast") -set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") - -set(CTEST_DROP_METHOD http) -set(CTEST_DROP_SITE "my.cdash.org") -set(CTEST_DROP_LOCATION "/submit.php?project=OpenFAST") -set(CTEST_DROP_SITE_CDASH TRUE) - -# saved for debugging -#set(CTEST_DROP_SITE "localhost") -#set(CTEST_DROP_LOCATION "/cdash/public/submit.php?project=openfast") From 4d76d5be8ce72236be39bdb25834d442b0bbd983 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 9 Dec 2020 13:05:55 -0600 Subject: [PATCH 2/5] GH Actions: add ignore-paths --- .github/workflows/automated-dev-tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/automated-dev-tests.yml b/.github/workflows/automated-dev-tests.yml index 3a6c7bbdd8..3dc5a719da 100644 --- a/.github/workflows/automated-dev-tests.yml +++ b/.github/workflows/automated-dev-tests.yml @@ -3,9 +3,17 @@ name: 'Development Pipeline' on: push: + paths-ignore: + - 'docs/**' + - 'share/**' + - 'vs-build/**' pull_request: types: [opened, synchronize] #labeled, assigned] + paths-ignore: + - 'docs/**' + - 'share/**' + - 'vs-build/**' # runs-on: ${{ matrix.os }} # strategy: @@ -15,10 +23,6 @@ on: jobs: build-and-test: - # Do not run if: - # - Branch name contains "docs/" - if: "!contains(github.ref, 'docs/')" - runs-on: ubuntu-latest container: image: rafmudaf/openfast-ubuntu:dev @@ -87,10 +91,6 @@ jobs: # Test if single precision compile completes. # Do not run the test suite. - # Do not run if: - # - Branch name contains "docs/" - if: "!contains(github.ref, 'docs/')" - runs-on: ubuntu-latest container: image: rafmudaf/openfast-ubuntu:dev From 35bdb0ee4bab46d23c488ba4c11342654046457b Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Mon, 7 Dec 2020 16:43:32 -0600 Subject: [PATCH 3/5] Disable variable tracking in large modules --- glue-codes/openfast/CMakeLists.txt | 4 ++-- modules/openfast-library/CMakeLists.txt | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/glue-codes/openfast/CMakeLists.txt b/glue-codes/openfast/CMakeLists.txt index d0d257f4c7..27af49f592 100644 --- a/glue-codes/openfast/CMakeLists.txt +++ b/glue-codes/openfast/CMakeLists.txt @@ -14,8 +14,8 @@ # limitations under the License. # -add_executable(openfast - src/FAST_Prog.f90) +add_executable(openfast src/FAST_Prog.f90) +set_source_files_properties(src/FAST_Prog.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfast openfast_postlib foamfastlib) set_property(TARGET openfast PROPERTY LINKER_LANGUAGE Fortran) diff --git a/modules/openfast-library/CMakeLists.txt b/modules/openfast-library/CMakeLists.txt index 4cfe924329..d6301fab10 100644 --- a/modules/openfast-library/CMakeLists.txt +++ b/modules/openfast-library/CMakeLists.txt @@ -23,6 +23,8 @@ if (GENERATE_TYPES) endif() add_library(openfast_prelib src/FAST_Types.f90) +set_source_files_properties(src/FAST_Types.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") + target_link_libraries(openfast_prelib nwtclibs ifwlib @@ -50,9 +52,11 @@ add_library(openfast_postlib src/FAST_Subs.f90 src/FAST_Solver.f90 ) +set_source_files_properties(src/FAST_Subs.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfast_postlib openfast_prelib scfastlib foamfastlib versioninfolib) add_library(openfastlib src/FAST_Library.f90) +set_source_files_properties(src/FAST_Library.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfastlib openfast_postlib openfast_prelib scfastlib foamfastlib) install(TARGETS openfastlib openfast_prelib openfast_postlib From d8cb95558d0d9861127fcf758321e0b5b2f2e8d4 Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Wed, 9 Dec 2020 18:29:38 -0600 Subject: [PATCH 4/5] Run a simple test after compiling --- .github/workflows/automated-dev-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/automated-dev-tests.yml b/.github/workflows/automated-dev-tests.yml index 3dc5a719da..89e445d52f 100644 --- a/.github/workflows/automated-dev-tests.yml +++ b/.github/workflows/automated-dev-tests.yml @@ -113,3 +113,6 @@ jobs: uses: ./.github/actions/compile with: build-target: 'all' + - name: simple-test + working-directory: /openfast/build + run: ./glue-codes/openfast/openfast -v From 891a5ac5285749c166d3c576d639d9004236d59f Mon Sep 17 00:00:00 2001 From: Rafael M Mudafort Date: Thu, 10 Dec 2020 13:54:43 -0600 Subject: [PATCH 5/5] Restrict variable tracking to GNU and Release mode --- glue-codes/openfast/CMakeLists.txt | 9 ++++++++- modules/openfast-library/CMakeLists.txt | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/glue-codes/openfast/CMakeLists.txt b/glue-codes/openfast/CMakeLists.txt index 27af49f592..6bf9914d02 100644 --- a/glue-codes/openfast/CMakeLists.txt +++ b/glue-codes/openfast/CMakeLists.txt @@ -15,9 +15,16 @@ # add_executable(openfast src/FAST_Prog.f90) -set_source_files_properties(src/FAST_Prog.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfast openfast_postlib foamfastlib) set_property(TARGET openfast PROPERTY LINKER_LANGUAGE Fortran) +if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "RELEASE") + # With variable tracking enabled, the compile step frequently aborts on large modules and + # restarts with this option off. Disabling in Release mode avoids this problem when compiling with + # full optimizations, but leaves it enabled for RelWithDebInfo which adds both -O2 and -g flags. + # https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html + set_source_files_properties(src/FAST_Prog.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") +endif() + install(TARGETS openfast RUNTIME DESTINATION bin) diff --git a/modules/openfast-library/CMakeLists.txt b/modules/openfast-library/CMakeLists.txt index d6301fab10..66f97e08ee 100644 --- a/modules/openfast-library/CMakeLists.txt +++ b/modules/openfast-library/CMakeLists.txt @@ -23,7 +23,6 @@ if (GENERATE_TYPES) endif() add_library(openfast_prelib src/FAST_Types.f90) -set_source_files_properties(src/FAST_Types.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfast_prelib nwtclibs @@ -52,13 +51,23 @@ add_library(openfast_postlib src/FAST_Subs.f90 src/FAST_Solver.f90 ) -set_source_files_properties(src/FAST_Subs.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfast_postlib openfast_prelib scfastlib foamfastlib versioninfolib) add_library(openfastlib src/FAST_Library.f90) -set_source_files_properties(src/FAST_Library.f90 PROPERTIES COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments") target_link_libraries(openfastlib openfast_postlib openfast_prelib scfastlib foamfastlib) +if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL "RELEASE") + # With variable tracking enabled, the compile step frequently aborts on large modules and + # restarts with this option off. Disabling in Release mode avoids this problem when compiling with + # full optimizations, but leaves it enabled for RelWithDebInfo which adds both -O2 and -g flags. + # https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html + set_source_files_properties( + src/FAST_Subs.f90 src/FAST_Types.f90 src/FAST_Library.f90 + PROPERTIES + COMPILE_FLAGS "-fno-var-tracking -fno-var-tracking-assignments" + ) +endif() + install(TARGETS openfastlib openfast_prelib openfast_postlib EXPORT ${CMAKE_PROJECT_NAME}Libraries RUNTIME DESTINATION lib