Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install firedrake #4011

Draft
wants to merge 107 commits into
base: master
Choose a base branch
from
Draft

pip install firedrake #4011

wants to merge 107 commits into from

Conversation

connorjward
Copy link
Contributor

@connorjward connorjward commented Feb 5, 2025

Die firedrake-install! Die! Die! Die!

Remaining tasks

  • Decide what to do about make check

User-facing changes

pip install firedrake

  • Changes the officially supported installation method for Firedrake to using pip.
  • Adds a firedrake-configure script to facilitate installation.
  • firedrake-install/firedrake-update remain but spit out a deprecation warning.
  • Updates the install page to describe the new approach.
  • firedrake-install --doi will no longer work.

Docker

  • firedrake-vanilla and firedrake-complex have been renamed to firedrake-vanilla-default and firedrake-vanilla-complex respectively.
  • firedrake is now installed directly in the container. It is no longer necessary to activate a virtual environment.
  • The firedrake repository is now installed in ~/firedrake instead of ~/firedrake/src/firedrake. The same applies to other packages like gusto and thetis inside the firedrakeproject/firedrake container.
  • The Docker containers now ship OpenMPI instead of MPICH. This means that running parallel tests alongside serial ones with a single pytest invocation will no longer work.
  • VTK is no longer installed by default into the firedrake-vanilla containers. If your package needs it then please add it to your own pyproject.toml or run pip install vtk.

Please see firedrakeproject/gusto#618 as an example switching a workflow to using the new containers.

Developer-facing changes

  • The firedrake-env container no longer contains PETSc, which is instead built in firedrake-vanilla.
  • CI now rebuilds PETSc every time instead of pre-building it inside the firedrake-env container.
  • The linting and zenodo canary workflows have been merged into the same workflow file as the Firedrake tests. This means that we will get fewer notifications if (when) things fail.

Design choices

Unlike firedrake-install, firedrake-configure is designed to be very, very dumb. All it does is take in a specification of a desired package manager (apt-x86_64, apt-aarch64, brew-arm64) and "arch" (default or complex) and spits out a string of appropriate system dependencies (--show-system-dependencies) or PETSc configure options (--show-petsc-configure-options). You can also pass --no-package-manager if you aren't using a supported system and this will give you a set of PETSc configure options where everything is downloaded.

Copy link

github-actions bot commented Feb 5, 2025

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake complex8314 ran6614 passed1700 skipped0 failed

Copy link

github-actions bot commented Feb 5, 2025

TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake real0 ran0 passed0 skipped0 failed

* --show-system-packages consistent usage
* Use setuptools-scm to avoid needing MANIFEST.in
* docdeps container not needed any more
* fix pylit docs dependency
* Fix package data by enabling setuptools-scm
* Install more build dependencies for Thetis
To make sure that we can resolve the API.
* Implement firedrake-check in a totally crazy way
* Fix (?) library paths for libsupermesh (breaking Thetis)
* pin sphinx to <8.2.0
* Prefer && to ; in Dockerfiles
* Run firedrake-check in Dockerfile.vanilla
* Add [dev] optional dependency group and shrink [test] (as distinction
  unclear with [check])
Comment on lines +414 to +415
if package_manager == MACOS_HOMEBREW_ARM64:
vars["HDF5_DIR"] = "/opt/homebrew"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if package_manager == MACOS_HOMEBREW_ARM64:
vars["HDF5_DIR"] = "/opt/homebrew"
if package_manager == MACOS_HOMEBREW_ARM64:
vars["HDF5_DIR"] = "/opt/homebrew"
elif package_manager is None:
vars["HDF5_DIR"] = vars["PETSC_DIR"]+"/"+vars["PETSC_ARCH"]

If --no-package-manager is used then PETSc will be told to download hdf5, and HDF5_DIR must be set so h5py knows where to link against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants