Skip to content

Adding CI tests for the MPI parallelization of the Fromfile example #157

Adding CI tests for the MPI parallelization of the Fromfile example

Adding CI tests for the MPI parallelization of the Fromfile example #157

Workflow file for this run

name: Build
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y \
cmake libnetcdff-dev liblapack-dev python3-dev \
python3-numpy python3-mpi4py python3-pip curl \
libfyaml-dev libopenmpi-dev openmpi-bin
- name: Build YAXT
run: |
curl -s -L https://swprojects.dkrz.de/redmine/attachments/download/534/yaxt-0.11.1.tar.gz | tar xvz
cd yaxt-0.11.1
./configure --without-regard-for-quality --without-example-programs --without-perf-programs --with-pic \
--prefix=$HOME/yaxt
make -j 4
make install
- name: Build YAC
run: |
curl -s -L https://gitlab.dkrz.de/dkrz-sw/yac/-/archive/v3.2.0/yac-v3.2.0.tar.gz | tar xvz
cd yac-v3.2.0
./configure CFLAGS="-fPIC" CC=mpicc FC=mpif90 --disable-mpi-checks --with-yaxt-root=${HOME}/yaxt \
--prefix=$HOME/yac
make -j 4
make install
- name: Build main
run: |
mkdir build && cd build
cmake \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_CXX_FLAGS="-Werror -Wall -pedantic -O3" \
-DKokkos_ENABLE_SERIAL=ON \
-DENABLE_YAC_COUPLING=ON \
-DYAXT_ROOT=${HOME}/yaxt \
-DYAC_ROOT=${HOME}/yac \
-DCMAKE_MODULE_PATH=${PWD}/../libs/coupldyn_yac/cmake ..
make
- name: Build example adia0D
run: cd build && make adia0D
- name: Build example golcolls
run: cd build && make golcolls
- name: Build example longcolls
run: cd build && make longcolls
- name: Build example lowlistcolls
run: cd build && make lowlistcolls
- name: Build example szakallurbichcolls
run: cd build && make szakallurbichcolls
- name: Build example testikstraubcolls
run: cd build && make testikstraubcolls
- name: Build example const2D
run: cd build && make const2D
- name: Build example divfree2D
run: cd build && make divfree2D
- name: Build example eurec4a1D
run: cd build && make eurec4a1D
- name: Build example rshaft1D
run: cd build && make rshaft1D
- name: Build example spdtest
run: cd build && make spdtest
- name: Build example bubble3D
run: cd build && make bubble3D
- name: Build example fromfile
run: cd build && make fromfile
- name: Parallelization execution test
run: |
cd build
wget https://nextcloud.dkrz.de/s/PRdfiyJJoJ4x6YK/download/fromfile_data.tar.gz
tar -xvf fromfile_data.tar.gz
mpiexec -n 1 ./examples/fromfile/src/fromfile ../examples/fromfile/src/config/fromfile_config.yaml
mv bin bin_1
mpiexec -n 2 --host localhost:64 ./examples/fromfile/src/fromfile ../examples/fromfile/src/config/fromfile_config.yaml
mv bin bin_2
mpiexec -n 4 --host localhost:64 ./examples/fromfile/src/fromfile ../examples/fromfile/src/config/fromfile_config.yaml
mv bin bin_4
mpiexec -n 8 --host localhost:64 ./examples/fromfile/src/fromfile ../examples/fromfile/src/config/fromfile_config.yaml
mv bin bin_8
bash -l ../.github/compare_parallel_results.sh