diff --git a/.github/workflows/Linux.yaml b/.github/workflows/Linux.yaml index 48bddd7b..5a76fa98 100644 --- a/.github/workflows/Linux.yaml +++ b/.github/workflows/Linux.yaml @@ -13,12 +13,14 @@ jobs: matrix: #os: [ubuntu-18.04, ubuntu-latest] os: [ubuntu-latest] - build_type: [serial, openmp] + build_type: [serial, openmp, debug] include: - build_type: serial cmake_flags: -DCMAKE_INSTALL_PREFIX=`pwd` -DCMAKE_BUILD_TYPE=Release -DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=OFF - build_type: openmp cmake_flags: -DCMAKE_INSTALL_PREFIX=`pwd` -DCMAKE_BUILD_TYPE=Release -DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=ON + - build_type: debug + cmake_flags: -DCMAKE_INSTALL_PREFIX=`pwd` -DCMAKE_BUILD_TYPE=Debug -DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=OFF runs-on: ${{matrix.os}} steps: diff --git a/.github/workflows/MacOS.yaml b/.github/workflows/MacOS.yaml index 589a0b73..fd605b3b 100644 --- a/.github/workflows/MacOS.yaml +++ b/.github/workflows/MacOS.yaml @@ -13,12 +13,14 @@ jobs: fail-fast: false matrix: os: [macos-11, macos-latest] - build_type: [serial, openmp] + build_type: [serial, openmp, debug] include: - build_type: serial extra_flags: "-DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=OFF" - build_type: openmp extra_flags: "-DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=ON" + - build_type: debug + extra_flags: "-DELEMENTS_ENABLE_SERIAL=ON -DELEMENTS_ENABLE_OPENMP=OFF" runs-on: ${{matrix.os}} steps: @@ -44,10 +46,16 @@ jobs: # Explicitly hint Bison to CMake just in case BISON_PATH=$(brew --prefix bison)/bin/bison FLEX_PATH=$(brew --prefix flex)/bin/flex + # Determine build type + BUILD_TYPE="Release" + if [[ "${{ matrix.build_type }}" == "debug" ]]; then + BUILD_TYPE="Debug" + fi + # Initialize flags array CMAKE_OPTS=( "-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install" - "-DCMAKE_BUILD_TYPE=Release" + "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DBISON_EXECUTABLE=$BISON_PATH" "-DFLEX_EXECUTABLE=$FLEX_PATH" ) diff --git a/src/geometry/shapes.h b/src/geometry/shapes.h index 60b07dae..1242fb2a 100644 --- a/src/geometry/shapes.h +++ b/src/geometry/shapes.h @@ -24,8 +24,8 @@ class Plane Plane(const ViewCArrayKokkos& position_inp, const ViewCArrayKokkos& normal_inp){ - assert(position_inp.order() = 1 && "Plane constructor requires a 1D ViewCArrayKokkos for position"); - assert(normal_inp.order() = 1 && "Plane constructor requires a 1D ViewCArrayKokkos for normal"); + assert(position_inp.order() == 1 && "Plane constructor requires a 1D ViewCArrayKokkos for position"); + assert(normal_inp.order() == 1 && "Plane constructor requires a 1D ViewCArrayKokkos for normal"); assert(position_inp.extent() == normal_inp.extent() && "Plane constructor requires the position and normal vectors to have the same number of dimensions"); assert(position_inp.extent() >= 2 && "Plane constructor requires at least 2 dimensions"); @@ -83,8 +83,8 @@ class Circle Circle(const ViewCArrayKokkos& position_inp, const ViewCArrayKokkos& normal_inp, const double radius_inp){ - assert(position_inp.order() = 1 && "Circle constructor requires a 1D ViewCArrayKokkos for position"); - assert(normal_inp.order() = 1 && "Circle constructor requires a 1D ViewCArrayKokkos for normal"); + assert(position_inp.order() == 1 && "Circle constructor requires a 1D ViewCArrayKokkos for position"); + assert(normal_inp.order() == 1 && "Circle constructor requires a 1D ViewCArrayKokkos for normal"); assert(position_inp.extent() == normal_inp.extent() && "Circle constructor requires the position and normal vectors to have the same number of dimensions"); assert(radius_inp > 0.0 && "Circle constructor requires a positive radius"); assert(position_inp.extent() >= 2 && "Circle constructor requires at least 2 dimensions"); @@ -152,7 +152,7 @@ class Sphere Sphere(const ViewCArrayKokkos& position_inp, const double radius_inp){ - assert(position_inp.order() = 1 && "Sphere constructor requires a 1D ViewCArrayKokkos for position"); + assert(position_inp.order() == 1 && "Sphere constructor requires a 1D ViewCArrayKokkos for position"); assert(radius_inp > 0.0 && "Sphere constructor requires a positive radius"); assert(position_inp.extent() == 3 && "Sphere constructor requires a 3D ViewCArrayKokkos for position");