From a394f50111ef074a4983dfb93417a584c375dc77 Mon Sep 17 00:00:00 2001 From: abhinavsns <73834077+abhinavsns@users.noreply.github.com> Date: Wed, 1 May 2024 20:47:37 +0200 Subject: [PATCH 1/5] Fixing Install Issue#4 (#7) * Fixing Install Issue#4 --- .github/workflows/main.yml | 201 ++++++++++++++----------------------- openfpm_pdata | 2 +- 2 files changed, 76 insertions(+), 127 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71e10cac..96451628 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,138 +1,87 @@ name: OpenFPM_CI on: - pull_request: push: branches: - master - - fix/github-action - release: - + pull_request: + branches: + - master jobs: - build_almalinux: - runs-on: ubuntu-latest - container: almalinux:8.5 - steps: - - name: Install dependencies - run: | - dnf -y --refresh update - yum install -y openssh-clients cmake wget git gcc-c++ gcc-gfortran python39 bzip2 diffutils zlib-devel rpm-build - ln -s /usr/bin/python3 /usr/bin/python - - uses: actions/checkout@v3 - with: - submodules: true - - name: Restore Cache dependencies - uses: actions/cache/restore@v3 - with: - path: ~/openfpm_dependencies/ - key: almalinux-dep-${{ github.ref }} - - name: Setup Ccache - run: | - wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz - tar -xvf ccache-4.8-linux-x86_64.tar.xz -C $HOME - echo "$HOME/ccache-4.8-linux-x86_64/" >> $GITHUB_PATH - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - append-timestamp: false - - name: Build and Pack - run: | - export PATH="~/ccache-4.8-linux-x86_64/:$PATH" - git config --global safe.directory '*' - ./build.sh $(pwd) unused pdata 0 ${{ github.ref }} - cp $HOME/openfpm_vars $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - cp $HOME/.openfpm.mk $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - export DEP_PACKING=$HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - ln -s ./LICENSE.md LICENSE.txt - ln -s ./README.md README.txt - cd build - printf " -DCPACK_RUN_INSTALL_DEPENDENCIES=ON" >> cmake_build_options; - bash cmake_build_options; - echo "Calling CPACK" - cpack -G RPM centos - if [ $? -ne 0 ]; then - echo "Error creating package" - exit 1 - fi - mv openfpm_pdata-*-Linux.rpm openfpm-nightly-Linux-x86_64.rpm - - uses: actions/cache/save@v3 - if: always() - with: - path: ~/openfpm_dependencies/ - key: almalinux-dep-${{ github.ref }} - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: openfpm_nightly_builds - path: build/openfpm-nightly-Linux-x86_64.rpm -# - name: Single-core Test -# run: | -# source $HOME/openfpm_vars -# export OMP_NUM_THREADS=1 -# mpirun --allow-run-as-root -np 2 ./build/src/pdata -# echo "RUN numerics test" -# cd openfpm_numerics -# mpirun --allow-run-as-root -np 2 ../build/openfpm_numerics/src/numerics -# - name: Multi-core Test -# run: | -# source $HOME/openfpm_vars -# export OMP_NUM_THREADS=1 -# mpirun --allow-run-as-root -np 2 ./build/src/pdata -# echo "RUN numerics test" -# cd openfpm_numerics -# mpirun --allow-run-as-root -np 2 ../build/openfpm_numerics/src/numerics + test_build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + fail-fast: false - build_macos: - runs-on: macos-latest steps: - - name: Setup GNU Fortran - uses: modflowpy/install-gfortran-action@v1 - - name: Install dependencies - run: | - brew install cmake wget gcc gnu-sed - - uses: actions/checkout@v3 - with: - submodules: true - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - append-timestamp: false - - name: Restore Cache dependencies - uses: actions/cache/restore@v3 - with: - path: ~/openfpm_dependencies/ - key: macos-dep-${{ github.ref }} - - name: Build & Pack - run: | - export CC=gcc-12 - export CXX=g++-12 - ./build.sh $(pwd) unused pdata 0 ${{ github.ref }} - cp $HOME/openfpm_vars $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - cp $HOME/.openfpm.mk $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - export DEP_PACKING=$HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }} - ln -s ./LICENSE.md LICENSE.txt - ln -s ./README.md README.txt - cd build - printf " -DCPACK_RUN_INSTALL_DEPENDENCIES=ON" >> cmake_build_options; - bash cmake_build_options; - echo "Calling CPACK" - cpack -G productbuild osx - if [ $? -ne 0 ]; then - echo "Error creating package" - exit 1 - fi - mv openfpm_pdata-*-Darwin.pkg openfpm-nightly-Darwin-x86_64.pkg - - uses: actions/cache/save@v3 - if: always() - with: - path: ~/openfpm_dependencies/ - key: macos-dep-${{ github.ref }} - - name: Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: openfpm_nightly_builds - path: build/openfpm-nightly-Darwin-x86_64.pkg -# - name: Single-core Test + - name: Check out code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Cache Homebrew dependencies + uses: actions/cache@v2 + with: + path: | + ~/Library/Caches/Homebrew + /home/linuxbrew/.cache/Homebrew + $HOME/.ccache + key: ${{ runner.os }}-homebrew-${{ hashFiles('**/*.rb') }} + restore-keys: | + ${{ runner.os }}-homebrew- + + - name: Install dependencies + run: | + brew install cmake ccache petsc boost vc eigen hdf5-mpi + brew install abhinavsns/homebrew-openfpm/parmetis + brew install abhinavsns/homebrew-openfpm/libhilbert + brew install abhinavsns/homebrew-openfpm/blitz + brew install abhinavsns/homebrew-openfpm/algoim + export CCACHE_DIR="$HOME/.ccache" + mkdir -p "$CCACHE_DIR" + mkdir -p build + cd build + export CXX=mpic++ + cmake .. -DCMAKE_CXX_COMPILER=mpic++ \ + -DLIBHILBERT_ROOT=$(brew --prefix abhinavsns/homebrew-openfpm/libhilbert) \ + -DLD_FLAGS='-Wl,-ld_classic' \ + -DDYLD_LIBRARY_PATH=$(brew --prefix suitesparse)/lib:$(brew --prefix metis)/lib \ + -DCMAKE_INSTALL_PREFIX=$HOME/install5 \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DSE_CLASS1=OFF \ + -DSE_CLASS2=OFF \ + -DSE_CLASS3=OFF \ + -DTEST_COVERAGE=OFF \ + -DSCAN_COVERTY=OFF \ + -DTEST_PERFORMANCE=OFF \ + -DENABLE_ASAN=OFF \ + -DENABLE_NUMERICS=ON \ + -DENABLE_GARBAGE_INJECTOR=OFF \ + -DENABLE_VCLUSTER_GARBAGE_INJECTOR=OFF \ + -DCUDA_ON_BACKEND=NONE \ + -DMPI_ROOT=$(brew --prefix open-mpi) \ + -DPETSC_ROOT=$(brew --prefix petsc) \ + -DBOOST_ROOT=$(brew --prefix boost) \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DHDF5_ROOT=$(brew --prefix hdf5-mpi) \ + -DBLITZ_ROOT=$(brew --prefix abhinavsns/homebrew-openfpm/blitz) \ + -DALGOIM_ROOT=$(brew --prefix abhinavsns/homebrew-openfpm/algoim) \ + -DPARMETIS_ROOT=$(brew --prefix abhinavsns/homebrew-openfpm/parmetis) \ + -DMETIS_ROOT=$(brew --prefix metis) \ + -DOPENBLAS_ROOT=$(brew --prefix openblas) \ + -DSUITESPARSE_ROOT=$(brew --prefix suite-sparse) \ + -DEIGEN3_ROOT=$(brew --prefix eigen) \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache + - name: Build and install + run: make install + +# - name: Single-core Test # run: | # export CC=gcc-12 # export CXX=g++-12 diff --git a/openfpm_pdata b/openfpm_pdata index ab66ca95..2e2c6bc4 160000 --- a/openfpm_pdata +++ b/openfpm_pdata @@ -1 +1 @@ -Subproject commit ab66ca956af17fe9f75898658c087fe6b83cf599 +Subproject commit 2e2c6bc41e5150788bef642198d9b1e01a67ffe4 From f5b3c0e17f13107dc6cfb5eb08984d3a37bcd52a Mon Sep 17 00:00:00 2001 From: abhinavsns <73834077+abhinavsns@users.noreply.github.com> Date: Thu, 2 May 2024 11:32:32 +0200 Subject: [PATCH 2/5] Fix Pipeline Ubuntu (#8) --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96451628..dc841ee3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,8 @@ jobs: mkdir -p build cd build export CXX=mpic++ - cmake .. -DCMAKE_CXX_COMPILER=mpic++ \ + cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix) \ + -DCMAKE_CXX_COMPILER=mpic++ \ -DLIBHILBERT_ROOT=$(brew --prefix abhinavsns/homebrew-openfpm/libhilbert) \ -DLD_FLAGS='-Wl,-ld_classic' \ -DDYLD_LIBRARY_PATH=$(brew --prefix suitesparse)/lib:$(brew --prefix metis)/lib \ @@ -99,4 +100,4 @@ jobs: # mpirun --allow-run-as-root -np 2 ./build/src/pdata # echo "RUN numerics test" # cd openfpm_numerics -# mpirun --allow-run-as-root -np 2 ../build/openfpm_numerics/src/numerics \ No newline at end of file +# mpirun --allow-run-as-root -np 2 ../build/openfpm_numerics/src/numerics From ba0fa43b1be2ac363a0ea1f11dfff75cc3d80460 Mon Sep 17 00:00:00 2001 From: absingh Date: Thu, 2 May 2024 16:17:20 +0200 Subject: [PATCH 3/5] latest submodule pdata --- openfpm_pdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfpm_pdata b/openfpm_pdata index 2e2c6bc4..f0c2f4b8 160000 --- a/openfpm_pdata +++ b/openfpm_pdata @@ -1 +1 @@ -Subproject commit 2e2c6bc41e5150788bef642198d9b1e01a67ffe4 +Subproject commit f0c2f4b8f9433b5bd0659096f1f484b2af285ee0 From a31acec4b88fe49dc4b66753cbff153cbc8d4737 Mon Sep 17 00:00:00 2001 From: abhinavsns <73834077+abhinavsns@users.noreply.github.com> Date: Thu, 2 May 2024 16:46:25 +0200 Subject: [PATCH 4/5] Update main.yml (#9) --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc841ee3..c7922067 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,9 +39,9 @@ jobs: run: | brew install cmake ccache petsc boost vc eigen hdf5-mpi brew install abhinavsns/homebrew-openfpm/parmetis - brew install abhinavsns/homebrew-openfpm/libhilbert - brew install abhinavsns/homebrew-openfpm/blitz - brew install abhinavsns/homebrew-openfpm/algoim + brew install -s abhinavsns/homebrew-openfpm/libhilbert + brew install -s abhinavsns/homebrew-openfpm/blitz + brew install -s abhinavsns/homebrew-openfpm/algoim export CCACHE_DIR="$HOME/.ccache" mkdir -p "$CCACHE_DIR" mkdir -p build From 1c9ed20d1e8e42a571d1825f943991c34acacc74 Mon Sep 17 00:00:00 2001 From: absingh Date: Fri, 3 May 2024 12:17:16 +0200 Subject: [PATCH 5/5] latest submoduel pdata --- openfpm_pdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfpm_pdata b/openfpm_pdata index f0c2f4b8..995d66dd 160000 --- a/openfpm_pdata +++ b/openfpm_pdata @@ -1 +1 @@ -Subproject commit f0c2f4b8f9433b5bd0659096f1f484b2af285ee0 +Subproject commit 995d66dd3271b5e3238b66e4dbcac4befb2e3d94