2021-09-05 13:53:42 +05:30
|
|
|
name: Grid and Mesh Solver
|
2021-09-04 22:14:24 +05:30
|
|
|
on: [push]
|
|
|
|
|
|
|
|
env:
|
2023-02-24 19:18:16 +05:30
|
|
|
PETSC_VERSION: '3.18.4'
|
2021-12-12 03:38:18 +05:30
|
|
|
HOMEBREW_NO_ANALYTICS: 'ON' # Make Homebrew installation a little quicker
|
|
|
|
HOMEBREW_NO_AUTO_UPDATE: 'ON'
|
|
|
|
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 'ON'
|
|
|
|
HOMEBREW_NO_GITHUB_API: 'ON'
|
|
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 'ON'
|
2021-09-04 22:14:24 +05:30
|
|
|
|
|
|
|
jobs:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
gcc_ubuntu:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
runs-on: ubuntu-22.04
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-04 22:14:24 +05:30
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-18 14:15:33 +05:30
|
|
|
gcc_v: [9, 10, 11, 12]
|
|
|
|
fail-fast: false
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-04 22:14:24 +05:30
|
|
|
env:
|
|
|
|
GCC_V: ${{ matrix.gcc_v }}
|
|
|
|
|
|
|
|
steps:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2022-11-02 20:24:48 +05:30
|
|
|
- uses: actions/checkout@v3
|
2021-09-04 22:14:24 +05:30
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
- name: GCC - Install
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V} g++-${GCC_V}
|
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
|
|
|
|
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
|
|
|
|
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \
|
|
|
|
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: PETSc - Cache download
|
|
|
|
id: petsc-download
|
2022-11-02 20:24:48 +05:30
|
|
|
uses: actions/cache@v3
|
2021-09-05 20:16:09 +05:30
|
|
|
with:
|
|
|
|
path: download
|
2021-12-12 03:38:18 +05:30
|
|
|
key: petsc-${{ env.PETSC_VERSION }}.tar.gz
|
2021-09-05 20:16:09 +05:30
|
|
|
|
|
|
|
- name: PETSc - Download
|
|
|
|
if: steps.petsc-download.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${PETSC_VERSION}.tar.gz -P download
|
2021-09-05 20:16:09 +05:30
|
|
|
|
|
|
|
- name: PETSc - Prepare
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
tar -xf download/petsc-${PETSC_VERSION}.tar.gz -C .
|
|
|
|
export PETSC_DIR=${PWD}/petsc-${PETSC_VERSION}
|
2021-09-04 22:14:24 +05:30
|
|
|
export PETSC_ARCH=gcc${GCC_V}
|
|
|
|
printenv >> $GITHUB_ENV
|
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
- name: PETSc - Cache Installation
|
2021-09-05 20:16:09 +05:30
|
|
|
id: petsc-install
|
2022-11-02 20:24:48 +05:30
|
|
|
uses: actions/cache@v3
|
2021-09-04 22:14:24 +05:30
|
|
|
with:
|
2021-12-12 03:38:18 +05:30
|
|
|
path: petsc-${{ env.PETSC_VERSION }}
|
2022-12-18 14:15:33 +05:30
|
|
|
key: petsc-${{ env.PETSC_VERSION }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}
|
2021-09-04 22:14:24 +05:30
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
- name: PETSc - Installation
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
cd petsc-${PETSC_VERSION}
|
2021-09-04 22:14:24 +05:30
|
|
|
./configure --with-fc=gfortran --with-cc=gcc --with-cxx=g++ \
|
2022-12-18 14:15:33 +05:30
|
|
|
--download-openmpi --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib \
|
|
|
|
--with-mpi-f90module-visibility=1
|
2021-09-04 22:14:24 +05:30
|
|
|
make all
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: DAMASK - Compile
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD}
|
|
|
|
cmake --build build/grid --parallel
|
|
|
|
cmake --install build/grid
|
|
|
|
cmake -B build/mesh -DDAMASK_SOLVER=mesh -DCMAKE_INSTALL_PREFIX=${PWD}
|
|
|
|
cmake --build build/mesh --parallel
|
|
|
|
cmake --install build/mesh
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: DAMASK - Run
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid
|
|
|
|
|
2022-12-18 14:15:33 +05:30
|
|
|
|
2021-09-04 22:14:24 +05:30
|
|
|
intel:
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2022-11-02 14:56:17 +05:30
|
|
|
runs-on: [ubuntu-22.04]
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-04 22:14:24 +05:30
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-05 13:53:42 +05:30
|
|
|
intel_v: [classic, llvm] # Variant of Intel compilers
|
2022-12-18 14:15:33 +05:30
|
|
|
fail-fast: false
|
2021-09-05 13:53:42 +05:30
|
|
|
|
2021-09-04 22:14:24 +05:30
|
|
|
env:
|
|
|
|
INTEL_V: ${{ matrix.intel_v }}
|
|
|
|
|
|
|
|
steps:
|
2022-11-02 20:24:48 +05:30
|
|
|
- uses: actions/checkout@v3
|
2021-09-04 22:14:24 +05:30
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: Intel - Install
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
|
|
|
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
|
|
|
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
|
|
|
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
|
|
|
sudo apt-get update
|
2021-09-05 20:16:09 +05:30
|
|
|
sudo apt-get install \
|
|
|
|
intel-basekit \
|
|
|
|
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-fortran \
|
|
|
|
intel-oneapi-openmp intel-oneapi-mkl-devel
|
2021-09-04 22:14:24 +05:30
|
|
|
source /opt/intel/oneapi/setvars.sh
|
|
|
|
printenv >> $GITHUB_ENV
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: PETSc - Cache download
|
|
|
|
id: petsc-download
|
2022-11-02 20:24:48 +05:30
|
|
|
uses: actions/cache@v3
|
2021-09-05 20:16:09 +05:30
|
|
|
with:
|
|
|
|
path: download
|
2021-12-12 03:38:18 +05:30
|
|
|
key: petsc-${{ env.PETSC_VERSION }}.tar.gz
|
2021-09-05 20:16:09 +05:30
|
|
|
|
|
|
|
- name: PETSc - Download
|
|
|
|
if: steps.petsc-download.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${PETSC_VERSION}.tar.gz -P download
|
2021-09-05 20:16:09 +05:30
|
|
|
|
|
|
|
- name: PETSc - Prepare
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
tar -xf download/petsc-${PETSC_VERSION}.tar.gz -C .
|
2023-02-24 19:18:16 +05:30
|
|
|
sed -i "1719s/if not os.path.isfile(os.path.join(self.packageDir,'configure')):/if True:/g" \
|
2022-11-03 13:50:14 +05:30
|
|
|
./petsc-${PETSC_VERSION}/config/BuildSystem/config/package.py
|
2021-12-12 03:38:18 +05:30
|
|
|
export PETSC_DIR=${PWD}/petsc-${PETSC_VERSION}
|
2021-09-04 22:14:24 +05:30
|
|
|
export PETSC_ARCH=intel-${INTEL_V}
|
|
|
|
printenv >> $GITHUB_ENV
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: PETSc - Cache installation
|
|
|
|
id: petsc-install
|
2022-11-02 20:24:48 +05:30
|
|
|
uses: actions/cache@v3
|
2021-09-04 22:14:24 +05:30
|
|
|
with:
|
2021-12-12 03:38:18 +05:30
|
|
|
path: petsc-${{ env.PETSC_VERSION }}
|
|
|
|
key: petsc-${{ env.PETSC_VERSION }}-intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}
|
2021-09-04 22:14:24 +05:30
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: PETSc - Install (classic)
|
2021-09-04 22:14:24 +05:30
|
|
|
if: contains( matrix.intel_v, 'classic')
|
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
cd petsc-${PETSC_VERSION}
|
2022-10-13 15:35:43 +05:30
|
|
|
./configure \
|
|
|
|
--with-fc='mpiifort -fc=ifort -diag-disable=10441' \
|
|
|
|
--with-cc='mpiicc -cc=icc -diag-disable=10441' \
|
|
|
|
--with-cxx='mpiicpc -cxx=icpc -diag-disable=10441' \
|
2021-10-08 19:35:36 +05:30
|
|
|
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
|
2021-09-04 22:14:24 +05:30
|
|
|
make all
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: PETSc - Install (LLVM)
|
2021-09-04 22:14:24 +05:30
|
|
|
if: contains( matrix.intel_v, 'llvm')
|
|
|
|
run: |
|
2021-12-12 03:38:18 +05:30
|
|
|
cd petsc-${PETSC_VERSION}
|
2022-10-13 15:35:43 +05:30
|
|
|
./configure \
|
|
|
|
--with-fc='mpiifort -fc=ifx' \
|
|
|
|
--with-cc='mpiicc -cc=icx' \
|
|
|
|
--with-cxx='mpiicpc -cxx=icpx' \
|
2021-10-08 19:35:36 +05:30
|
|
|
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
|
2021-09-04 22:14:24 +05:30
|
|
|
make all
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: DAMASK - Compile
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD}
|
|
|
|
cmake --build build/grid --parallel
|
|
|
|
cmake --install build/grid
|
|
|
|
cmake -B build/mesh -DDAMASK_SOLVER=mesh -DCMAKE_INSTALL_PREFIX=${PWD}
|
|
|
|
cmake --build build/mesh --parallel
|
|
|
|
cmake --install build/mesh
|
|
|
|
|
2021-09-05 20:16:09 +05:30
|
|
|
- name: DAMASK - Run
|
2021-09-04 22:14:24 +05:30
|
|
|
run: |
|
|
|
|
./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid
|