Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'Parallel h5py installation'
description: 'Install h5py in parallel mode using the system MPI and HDF5 libraries'

runs:
using: "composite"
Expand Down
54 changes: 54 additions & 0 deletions .github/actions/install_petsc4py/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Install PETSc and petsc4py'
description: 'Install PETSc and petsc4py with complex support'

runs:
using: "composite"
steps:

- name: Cache PETSc
uses: actions/cache@v4
id: cache-petsc
env:
cache-name: cache-PETSc
with:
path: "./petsc"
key: petsc-${{ matrix.os }}-${{ matrix.python-version }}

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
shell: bash
run: |
git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git
# The branch "release" contains work towards the next version of PETSc,
# and it may not be stable. If necessary, it can be cloned as follows:
# git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
shell: bash
working-directory: ./petsc
run: |
export PETSC_DIR=$(pwd)
export PETSC_ARCH=petsc-cmplx
./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1
make all
echo "PETSC_DIR=$PETSC_DIR" > petsc.env
echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env

# This step is not really necessary and could be combined with PETSc install
# step; however it's good to verify if the cached PETSc installation really works!
- name: Test PETSc installation
shell: bash
working-directory: ./petsc
run: |
source petsc.env
make check
echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV
echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV

- name: Install petsc4py
shell: bash
working-directory: ./petsc
run: |
pip install wheel Cython numpy
pip install src/binding/petsc4py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'MacOS installation commands'
description: 'Install non-Python dependencies on macOS'

runs:
using: "composite"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'Ubuntu installation commands'
description: 'Install non-Python dependencies on Ubuntu'

runs:
using: "composite"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
submodules: true

- name: Install dependencies
uses: ./.github/actions/ubuntu_install
uses: ./.github/actions/ubuntu_installations

- name: Update build tools
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Install dependencies
if: steps.duplicate_check.outputs.should_skip != 'true'
uses: ./.github/actions/ubuntu_install
uses: ./.github/actions/ubuntu_installations

- name: Update build tools
if: steps.duplicate_check.outputs.should_skip != 'true'
Expand Down
46 changes: 3 additions & 43 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,51 +56,11 @@ jobs:
run: |
pip install --upgrade pip setuptools wheel

- name: Cache PETSc
uses: actions/cache@v4
id: cache-petsc
env:
cache-name: cache-PETSc
with:
path: "./petsc"
key: petsc-${{ matrix.os }}-${{ matrix.python-version }}

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
run: |
git clone --depth 1 -b release https://gitlab.com/petsc/petsc.git
# when a tag will be available for the latest release we can install with
# git clone --depth 1 --branch v*.**.* https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
working-directory: ./petsc
run: |
export PETSC_DIR=$(pwd)
export PETSC_ARCH=petsc-cmplx
./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1
make all
echo "PETSC_DIR=$PETSC_DIR" > petsc.env
echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env

# This step is not really necessary and could be combined with PETSc install
# step; however it's good to verify if the cached PETSc installation really works!
- name: Test PETSc installation
working-directory: ./petsc
run: |
source petsc.env
make check
echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV
echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV

- name: Install petsc4py
working-directory: ./petsc
run: |
pip install wheel Cython numpy
pip install src/binding/petsc4py
- name: Install PETSc and petsc4py with complex support
uses: ./.github/actions/install_petsc4py

- name: Install h5py in parallel mode
uses: ./.github/actions/parallel_h5py
uses: ./.github/actions/install_h5py

- name: Install project
run: |
Expand Down
50 changes: 5 additions & 45 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:

- name: Install non-Python dependencies on Ubuntu
if: matrix.os == 'ubuntu-24.04'
uses: ./.github/actions/ubuntu_install
uses: ./.github/actions/ubuntu_installations

- name: Install non-Python dependencies on macOS
if: matrix.os == 'macos-14'
uses: ./.github/actions/macos_install
uses: ./.github/actions/macos_installations

- name: Print information on MPI and HDF5 libraries
run: |
Expand All @@ -67,51 +67,11 @@ jobs:
run: |
pip install --upgrade pip setuptools wheel

- name: Cache PETSc
uses: actions/cache@v4
id: cache-petsc
env:
cache-name: cache-PETSc
with:
path: "./petsc"
key: petsc-${{ matrix.os }}-${{ matrix.python-version }}

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
run: |
git clone --depth 1 -b release https://gitlab.com/petsc/petsc.git
# when a tag will be available for the latest release we can install with
# git clone --depth 1 --branch v*.**.* https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
working-directory: ./petsc
run: |
export PETSC_DIR=$(pwd)
export PETSC_ARCH=petsc-cmplx
./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1
make all
echo "PETSC_DIR=$PETSC_DIR" > petsc.env
echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env

# This step is not really necessary and could be combined with PETSc install
# step; however it's good to verify if the cached PETSc installation really works!
- name: Test PETSc installation
working-directory: ./petsc
run: |
source petsc.env
make check
echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV
echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV

- name: Install petsc4py
working-directory: ./petsc
run: |
pip install wheel Cython numpy
pip install src/binding/petsc4py
- name: Install PETSc and petsc4py with complex support
uses: ./.github/actions/install_petsc4py

- name: Install h5py in parallel mode
uses: ./.github/actions/parallel_h5py
uses: ./.github/actions/install_h5py

- name: Install project
run: |
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added

- #577 : Add an installation configuration option to choose the backend language
- [DEVELOPER] Create action `install_petsc4py` to install PETSc & `petsc4py` w/ complex support

### Fixed

Expand All @@ -18,16 +19,19 @@ All notable changes to this project will be documented in this file.
- #570 : Optimize PSYDAC logo
- #565 : Expand editable install info in `README.md`
- #566 : Fix command `psydac test --mpi` on Ubuntu machines
- [DEVELOPER] Add missing 'description' properties (required!) to our GitHub actions
- [DEVELOPER] Update CI installation of `petsc4py` after release of `setuptools` 81.0
- [DEVELOPER] Check correct reporting of failure for `psydac test` command in CI testing
- [DEVELOPER] Use correct configuration file in coverage CI tests

### Changed

- #580 : Use PETSc 3.25.0 whose Python bindings `petsc4py` install correctly with `setuptools>=81.0`
- #579 : Require `pyccel>=2.2.3` which can compile all kernels with C
- #579 : Require `numpy>=2.1` to support Python >= 3.10
- #579 : Require `pytest>=9.0` and use `pytest.toml` instead of `pytest.ini` for Pytest configuration
- #579 : Move coverage configuration from `pyproject.toml` to `psydac/pytest.toml`
- [DEVELOPER] Rename actions: `macos/ubuntu_install` -> `macos/ubuntu_installations`
- [DEVELOPER] Do not check file changes to trigger testing workflow on PRs
- [DEVELOPER] Run documentation workflow on pushes to `devel` whenever `README.md` is modified
- [DEVELOPER] Run testing and documentation workflows on PRs only when set to "ready for review"
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Although PSYDAC provides several iterative linear solvers which work with our na
In order to use these additional feature, PETSc and petsc4py must be installed as follows.
First, we download the latest release of PETSc from its [official Git repository](https://gitlab.com/petsc/petsc):
```sh
git clone --depth 1 --branch v3.24.2 https://gitlab.com/petsc/petsc.git
git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git
```
Next, we specify a configuration for complex numbers, and install PETSc in a local directory:
```sh
Expand Down
Loading