Skip to content

Unix-MPICH

Unix-MPICH #571

Workflow file for this run

name: Unix
on:
push:
pull_request:
# Run daily at midnight (UTC).
schedule:
- cron: '0 0 * * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
# Increase this value to reset cache
env: {CACHE_NUMBER: 0}
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
name: Setup conda
with:
auto-update-conda: true
activate-environment: testing
auto-activate-base: false
channels: defaults
channel-priority: true
- shell: bash -l {0}
name: Install dependencies
run: |
conda install numpy pandas pytorch cpuonly -c pytorch
conda install -c conda-forge mpi4py mpich
pip install .[test]
- shell: bash -l {0}
name: Lint with flake8
run: |
flake8 ./optimas
flake8 ./examples --extend-ignore F821 --exclude custom_fld_diags.py,custom_ptcl_diags.py
- shell: bash -l {0}
name: Run unit tests with MPICH
run: |
python -m pytest tests/
- shell: bash -l {0}
name: Replace MPICH with openMPI
run: |
conda uninstall mpi4py mpich
conda install -c conda-forge mpi4py openmpi
- shell: bash -l {0}
name: Run unit tests with openMPI
run: |
rm -r tests_output
python -m pytest tests/