diff --git a/.github/workflows/exercises.yml b/.github/workflows/exercises.yml index e4fdd42..79eda97 100644 --- a/.github/workflows/exercises.yml +++ b/.github/workflows/exercises.yml @@ -19,14 +19,14 @@ jobs: steps: - name: Set up Git repository uses: actions/checkout@v4 - - name: Prepare all exercices and solutions with the OpenMP backend + - name: Prepare all exercices with the OpenMP backend run: | cmake \ -B build \ -DCMAKE_BUILD_TYPE=Release \ -DKokkos_ENABLE_OPENMP=ON \ exercises - - name: Build all exercises and solutions + - name: Build all exercises run: | cmake \ --build build \ diff --git a/.github/workflows/projects.yml b/.github/workflows/projects.yml index a0c48a0..26408fc 100644 --- a/.github/workflows/projects.yml +++ b/.github/workflows/projects.yml @@ -16,59 +16,30 @@ on: jobs: - build_kokkos: + build_test_projects: runs-on: ubuntu-latest steps: - name: Set up Git repository uses: actions/checkout@v4 - - name: Install Kokkos + - name: Prepare all projects with the OpenMP backend run: | - git clone https://github.com/kokkos/kokkos.git - cd kokkos - git checkout develop - mkdir build_openmp - mkdir install_openmp - cmake -B build_openmp -DCMAKE_INSTALL_PREFIX=${PWD}/install_openmp -DKokkos_ENABLE_OPENMP=ON ./ - make install -C build_openmp - - name: Upload Kokkos artifact - uses: actions/upload-artifact@v4 - with: - name: kokkos - path: kokkos/install_openmp - - build_wave_projects: - runs-on: ubuntu-latest - needs: [build_kokkos] - steps: - - name: Set up Git repository - uses: actions/checkout@v4 - - name: Download Kokkos artifact - uses: actions/download-artifact@v4 - with: - name: kokkos - path: kokkos/install_openmp - - name: wave sequential + cmake \ + -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DKokkos_ENABLE_OPENMP=ON \ + projects + - name: Build all projects run: | - cd projects/wave/sequential/ - cmake -DCMAKE_BUILD_TYPE=Release ./ - make - ./exe - cd ${GITHUB_WORKSPACE} + cmake \ + --build build \ + --parallel $(($(nproc) * 2 + 1)) - name: wave openMP + - name: Test all solutions and reference implementations + env: + OMP_PROC_BIND: spread + OMP_PLACES: threads + OMP_NUM_THREADS: 2 run: | - cd projects/wave/omp - cmake -DCMAKE_BUILD_TYPE=Release ./ - make - export OMP_NUM_THREADS=2 - export OMP_PROC_BIND=true - export OMP_SCHEDULER=dynamic - ./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1 - cd ${GITHUB_WORKSPACE} - - name: wave Kokkos - run: | - cd projects/wave/solution/ - cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_DIR=${GITHUB_WORKSPACE}/kokkos/install_openmp/lib/cmake/Kokkos/ ./ - make - ./exe --size 128 128 --time 5 --output-period 100 --print-period 100 --domain-length 10 10 --boundary 1 - cd ${GITHUB_WORKSPACE} - + ctest \ + --test-dir build \ + --output-on-failure