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/how_to_guides/installing_pvade.rst
+115Lines changed: 115 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,121 @@ We can test the successful installation of PVade and it's MPI implementation by
44
44
The example solve a Poisson's equation in 3 dimensions using 64 elements and 1 order Lagrange shape functions with cg as the ksp solver and no preconditioners.
45
45
For more details about the poisson's problem we refer the use to the folowing link https://jsdokken.com/dolfinx-tutorial/chapter1/fundamentals.html
46
46
47
+
48
+
49
+
Accessing the DOLFINx programming environment on Windows: a review
[Instructions for DOLFINx](https://github.com/FEniCS/dolfinx/blob/main/README.md)
55
+
56
+
1. Using WSL2
57
+
58
+
A Windows 11 computer should have WSL natively. In a command prompt, ``wsl --status`` will tell you if you have WSL version 2, which is generally preferred.
59
+
60
+
To install a Ubuntu distro in WSL 2, in a command prompt, run::
61
+
62
+
wsl --install
63
+
64
+
You'll be instructed to create a username and password. After install, your prompt will be logged in to Ubuntu on WSL. You can also access this prompt in the future by searching your apps for Ubuntu.
65
+
66
+
In Ubuntu, follow the instructions to install the DOLFINx environment.::
67
+
68
+
69
+
add-apt-repository ppa:fenics-packages/fenics
70
+
apt update
71
+
apt install fenicsx
72
+
73
+
74
+
This may take up to an hour to install.
75
+
76
+
Following installation, you can access your environment by opening Ubuntu. You can use ``apt`` or ``pip`` to install any additional packages you need.
77
+
If you want to access this environment in VSCode, you can use the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl), which works very similar to remotely accessing HPC systems through SSH with the [SSH extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh).
78
+
79
+
I found this method to be the easiest to set up, access, and understand.
80
+
81
+
2. Using Docker
82
+
83
+
[Install](https://docs.docker.com/desktop/install/windows-install/) Docker. Docker Desktop needs a license, as NREL is a large organization. I don't know if these are available. However, a Docker Destop license is not necessary for installing a DOLFINx environment in Docker.
84
+
85
+
Docker uses images, which are recipes for programming environments, and containers, which are instances based on an image. Containers can be created and destroyed, entered and exited.
86
+
87
+
To get up and running with docker, run ::
88
+
89
+
docker run --name fenicsx -ti dolfinx/dolfinx:nightly
90
+
91
+
92
+
The image, ``dolfinx/dolfinx:nightly``, can be replaced with other options listed in the instructions.
93
+
In most cases I would recommend ``dolfinx/dolfinx:stable``, but I used the nightly version to avoid a bug with DOLFINx that hopefully would be resolved by the time this is relevant.
94
+
95
+
This instruction creates a container from the image, and the first time it is run, it also pulls the image data. This may take up to 20 minutes. If you run this command again, it will create a new container from the same image. Note that you would want to leave out or change the `--name fenicsx` tag, and that it would take far less time the second time, as the image is already pulled.
96
+
97
+
A container runs one command. By default, that command is to open a terminal. When you exit that terminal, the container also exits.
98
+
99
+
You may re-enter a Docker container by running::
100
+
101
+
docker start -i fenics
102
+
103
+
104
+
Exiting and re-entering containers will keep data like files downloaded and packages installed,
105
+
on top of the original image. Removing and re-creating a new container will not keep this data, only the original image.
106
+
107
+
To install additional packages, you may use ``pip`` while you are inside your docker container.
108
+
109
+
There are ways to keep files from one container to another or from your container to your local computer.
110
+
There are also ways to modify and update the docker container with additional packages. I do not know them.
111
+
112
+
Docker works on Windows. If you understand Docker, I'd recommend using Docker for DOLFINx.
113
+
If you don't, I'd recommend WSL2.
114
+
115
+
3. Using Conda
116
+
Windows supports Miniconda and Anaconda. Current DOLFINx instructions read::
On conda-forge, pyvista supports Windows, but mpich and fenics-dolfinx do not. If that changed, you could use conda environments on Windows by:
125
+
1. Installing Miniconda or Anaconda
126
+
2. Opening Anaconda prompt
127
+
3. Following the above instructions to create and set up the environment
128
+
129
+
It's unclear whether mpich and fenics-dolfinx cannot be ported to Windows, or just haven't yet been. At present, though, they aren't, so a conda DOLFINx environment through conda-forge is not possible.
130
+
131
+
4. Using Spack
132
+
133
+
Windows only technically supports spack. In theory, one would use spack on Windows according to [these instructions](https://spack.readthedocs.io/en/latest/getting_started.html#spack-on-windows). Your procedure would look like:
134
+
1. Installing prerequisites VSCode with C++ compiler options, Python, Git
135
+
136
+
2. Cloning spack
137
+
::
138
+
git clone https://github.com/spack/spack.git
139
+
140
+
3. Opening a spack prompt, by running ``bin\spack_cmd.bat``.
I got no further than step 1; I couldn't find options to install VSCode with the needed C++ compiler. Many spackages are also not supported by Windows, so you likely would also not be able to run the `spack add` line in step 5.
157
+
158
+
Development to get spack to work on Windows is underway. Development to port the relevant spackages to Windows is not. Verdict: DOLFINx with Spack on Windows is impossible at current stages, and a pain even if possible.
0 commit comments