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
Copy file name to clipboardExpand all lines: docs/software/cae/fenics.md
+27-30Lines changed: 27 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,6 @@
4
4
5
5
[FEniCS](https://fenicsproject.org/) is a popular open-source computing platform for solving partial differential equations (PDEs) using the finite element method ([FEM](https://en.wikipedia.org/wiki/Finite_element_method)). Originally developed in 2003, the earlier version is now known as legacy FEniCS. In 2020, the next-generation framework [FEniCSx](https://docs.fenicsproject.org/) was introduced, with the latest stable [release v0.9.0](https://fenicsproject.org/blog/v0.9.0/) in October 2024. Though it builds on the legacy FEniCS but introduces significant improvements over the legacy libraries. FEniCSx is composed of the following libraries that support typical workflows: [UFL](https://github.com/FEniCS/ufl) → [FFCx](https://github.com/FEniCS/ffcx) → [Basix](https://github.com/FEniCS/basix) → [DOLFINx](https://github.com/FEniCS/dolfinx), which are the build blocks of it. And new users are encouraged to adopt [FEniCSx](https://fenicsproject.org/documentation/) for its modern features and active development support.
6
6
7
-
8
-
(Maybe add a short intro into the stack the software depends on, and further more the internal dependencies UFL->FFCx ...)
9
-
10
-
11
-
12
-
13
7
FEniCSx can be installed on [ULHPC](https://www.uni.lu/research-en/core-facilities/hpc/) systems using [Easybuild](https://docs.easybuild.io) or [Spack](https://spack.io/), Below are detailed instructions for each method,
14
8
15
9
<!-- Intro end -->
@@ -27,47 +21,50 @@ Building FEniCSx with Spack on the [ULHPC](https://www.uni.lu/research-en/core-f
27
21
Create and Activate a Spack Environment:
28
22
29
23
To maintain an isolated installation, create a dedicated Spack environment in a chosen directory.
30
-
The following example builds FEniCSx in the `home` directory:
24
+
The following example sets up a stable release of FEniCSx `v0.9.0` in the `fenicsx-test` directory inside the `home` directory:
31
25
32
26
cd ~
33
-
spack env create -d fenicsx-0.9.0/
34
-
spack env activate fenicsx-0.9.0/
27
+
spack env create -d fenicsx-test/
28
+
spack env activate fenicsx-test/
29
+
35
30
36
31
37
32
Add the core FEniCSx components and common dependencies:
# Change @0.9.0 to any version in the above if you want a another version.
42
-
spack concretize
43
-
spack install -j16
44
-
45
-
46
-
!!! question " why concretize and -j16 ? "
36
+
!!! Additional
47
37
48
-
`spack concretize` resolves all dependencies and selects compatible versions for the specified packages. `-j16` sets the number cores to use for building. Using a higher number can speed up the build but should be chosen based on available CPU cores and cluster policies.
38
+
The spack `add command` add abstract specs of packages to the currently active environment and registers them as root `specs` in the environment’s `spack.yaml` file. Alternatively, packages can be predefined directly in the `spack.yaml` file located in`$SPACK_ENV`.
`unify: true` ensures all packages share the same dependency versions, preventing multiple builds of the same library. Without it, each `spec` could resolve dependencies independently, leading to potential conflicts and redundant installations.
69
58
59
+
Once Packages `specs` have been added to the current environment, they need to be concretized.
60
+
61
+
spack concretize
62
+
spack install -j16
63
+
64
+
!!! note
70
65
66
+
Here, [`spack concretize`](https://spack.readthedocs.io/en/latest/environments.html#spec-concretization) resolves all dependencies and selects compatible versions for the specified packages. In addition to adding individual specs to an environment, the `spack install` command installs the entire environment at once and `-j16` option sets the number of CPU cores used for building, which can speed up the installation.
67
+
Once installed, the FEniCSx environment is ready to use on the cluster.
71
68
72
69
The following are also common dependencies used in FEniCS scripts:
0 commit comments