You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Firedrake installation instructions and workflow (#125)
Closes#112.
The Firedrake installation approach moved away from the
`firedrake-install` script and is now clearly separated in three
distinct steps that are described in
https://www.firedrakeproject.org/install.html and that are very easy for
users to follow. We follow their instructions almost exactly as
described, except that we pass some extra flags to PETSc's `configure`
(`--download-parmmg` etc.).
So here I removed a lot of our own installation instructions, as well as
related files that we used to aid the installation process.
The following installation instructions assume a Linux or Windows Subsystem for Linux (WSL) operating system.
2
-
The mesh adaptation modules are dependent on a custom setup for Firedrake with PETSc from either a [Makefile](#default-approach) or a [Docker image](#installing-firedrake-via-docker-image).
2
+
The mesh adaptation modules are dependent on a custom setup for Firedrake with PETSc from either a [local installation](#local-firedrake-installation) or a [pre-built Docker image](#installing-firedrake-via-docker-image).
3
3
Once Firedrake is installed (or if you already have a working installation), see the section on [installing Animate, Goalie, or Movement](#installing-animate-goalie-or-movement).
4
4
5
-
## Installing Firedrake with custom PETSc
5
+
## Local Firedrake installation
6
6
7
-
Firedrake and PETSc are required by Animate, Goalie, and Movement. Choose from the following installation approaches for these packages.
7
+
As described on the [Firedrake installation page](https://www.firedrakeproject.org/install.html#), a native installation of Firedrake is accomplished in 3 steps:
8
+
1. Installing systems dependencies
9
+
2. Installing PETSc
10
+
3. Installing Firedrake itself.
8
11
9
-
### Default approach
10
-
11
-
The first approach uses the default MPI packages found in the path.
12
-
Run the following code to download and install Firedrake and PETSc using the associated Makefile and bespoke PETSc options:
The `make install` command accepts several optional arguments:
20
-
*`FIREDRAKE_ENV` for setting the Firedrake virtual environment name. Defaults to `firedrake-mmmyy`, where `mmm` is the first three letters of the current month and `yy` are the last two digits of the current year.
21
-
*`BUILD_DIR` for setting the build directory. Defaults to the current directory.
22
-
*`PETSC_CONFIGURE_FILE` for setting the PETSc configure options. Defaults to `petsc_configure_options.txt`.
23
-
These options may be combined, e.g.:
24
-
```
25
-
make install FIREDRAKE_ENV=firedrake-dev BUILD_DIR=/scratch PETSC_CONFIGURE_FILE=my_configure_file.txt
26
-
```
27
-
28
-
### Custom MPI approach
29
-
30
-
The second approach allows customisation of the MPI packages by passing arguments to the associated Makefile. First, download the Makefile and bespoke PETSc options using `curl`:
When running `make install`, pass arguments for `MPICC`, `MPICXX`, `MPIF90`, and `MPIEXEC`:
12
+
To use the mesh adaptation modules, we can install system dependencies (step 1) and Firedrake (step 3) exactly as described, but we must [customise the PETSc installation](https://www.firedrakeproject.org/install.html#id29) (step 2) to install additional packages: Eigen, ParMETIS, MMG, and ParMMG. We do that simply by passing the `--download-<PACKAGE>` flags when running PETSc `configure`:
36
13
```
37
-
make install MPICC=/path/to/mpicc MPICXX=/path/to/mpicxx MPIF90=/path/to/mpif90 MPIEXEC=/path/to/mpiexec
docker run --rm -it -v ${HOME}:${HOME} ghcr.io/mesh-adaptation/firedrake-parmmg:latest
22
+
docker run -it ghcr.io/mesh-adaptation/firedrake-parmmg:latest
46
23
```
47
24
48
-
NOTE: by installing via a Docker image with ``${HOME}`` you are giving Docker access to your home space.
25
+
For more information on how to run docker containers, see the [official documentation](https://docs.docker.com/engine/containers/run/). For example, since all data inside a container is only accessible from inside the container, it is useful to create [filesystem mounts](https://docs.docker.com/engine/containers/run/#filesystem-mounts) to be able to access data from outside the container.
49
26
50
27
## Installing Mesh Adaptation modules
51
28
52
29
The Mesh Adaptation packages can be installed through the following options, denoting the package of interest by `<PACKAGE>`.
53
30
In both cases, make sure that you have activated the Python virtual environment that was created when you installed Firedrake.
54
31
Ensure that you have activated the Python virtual environment associated with your Firedrake installation before following the steps below:
55
32
```
56
-
source /path/to/firedrake/bin/activate
33
+
source /path/to/venv/bin/activate
57
34
```
58
35
59
36
### Cloning via HTTPS
@@ -76,9 +53,6 @@ make install
76
53
77
54
It is highly recommended to keep your Firedrake installation and Mesh Adaptation software stack up to date.
78
55
**We recommend updating the full stack at least once every two months.**
79
-
The quickest way to do this is to use the `firedrake-update` command from within an active virtual environment.
80
-
This approach works well when there have been small changes to Firedrake and/or its associated dependencies and add-ons, but sometimes fails when there have been major changes.
81
-
See https://www.firedrakeproject.org/download.html for details on updating Firedrake.
82
56
83
-
If the `firedrake-update` approach fails then we recommend creating a whole new Firedrake installation using one of the approaches described above.
84
-
Note that the `--venv-name` command line option for the `firedrake-install` script can be useful for differentiating between different builds.
57
+
* To update Firedrake and PETSc, follow the [official Firedrake instructions](https://www.firedrakeproject.org/install.html#updating-firedrake) on how to do so.
58
+
* To update Animate/Goalie/Movement, simply change directory to where each one is located (`cd /path/to/package`) and run `git pull`.
0 commit comments