Skip to content

Commit

Permalink
Merge branch 'main' into patch-cmake-code
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-bhuiyan committed Aug 13, 2024
2 parents 727d38a + 7f2bcb7 commit 2b6d866
Show file tree
Hide file tree
Showing 18 changed files with 3,874 additions and 1,227 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -35,6 +46,7 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build-clangtidy
cd build-clangtidy
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/correctness-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -40,14 +51,15 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_SANITIZER_ADDRESS=ON \
-DOpenTurbine_ENABLE_SANITIZER_LEAK=ON \
-DOpenTurbine_ENABLE_SANITIZER_UNDEFINED=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
cp src/*.dll tests/unit_tests/
ctest --output-on-failure
14 changes: 13 additions & 1 deletion .github/workflows/correctness-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: macos-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -38,13 +49,14 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_SANITIZER_ADDRESS=ON \
-DOpenTurbine_ENABLE_SANITIZER_UNDEFINED=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
cp src/*.dll tests/unit_tests/
ctest --output-on-failure
12 changes: 12 additions & 0 deletions .github/workflows/cppcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ jobs:
spack external find
spack install googletest
spack install trilinos@master~mpi~epetra+basker
- name: Cache install yaml-cpp
id: cache-yaml-cpp
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-yaml-cpp
- name: Install yaml-cpp
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
source spack/share/spack/setup-env.sh
spack install yaml-cpp
- name: Clone
uses: actions/checkout@v4
with:
Expand All @@ -36,6 +47,7 @@ jobs:
source spack/share/spack/setup-env.sh
spack load trilinos
spack load googletest
spack load yaml-cpp
sudo apt-get install cppcheck
cd openturbine
mkdir build-cppcheck
Expand Down
1 change: 1 addition & 0 deletions Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ function(openturbine_setup_dependencies)
# Find and link required packages
find_package(KokkosKernels REQUIRED)
find_package(Amesos2 REQUIRED)
find_package(yaml-cpp REQUIRED)

# Optionally find and link MKL if available
if(TARGET Kokkos::MKL)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ target_link_libraries(openturbine_library PRIVATE
target_link_system_libraries(openturbine_library PRIVATE
KokkosKernels::kokkoskernels
Amesos2::amesos2
yaml-cpp
${FS_LIB}
)

Expand Down
3 changes: 0 additions & 3 deletions src/utilities/controllers/discon_rotor_test_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ void PITCH_CONTROLLER(

// If this is the first call, output the controller input and output file names
if (first_call) {
std::cout << "controller input file: " << accINFILE << std::endl;
std::cout << "controller output file: " << avcOUTNAME << std::endl;

// Set first call to false
first_call = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/controllers/turbine_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void TurbineController::CallController() {
if (status < 0) {
throw std::runtime_error("Error raised in controller: " + message);
} else if (status > 0) {
std::cout << "Warning from controller: " << message << std::endl;
std::cout << "Warning from controller: " << message << "\n";
}
}

Expand Down
Loading

0 comments on commit 2b6d866

Please sign in to comment.