DOC: VcXsrv (WSL) and RockyLinux information

REL: reference 2312 instead of 2306
Mark Olesen
2023-12-19 10:00:28 +01:00
parent 3882203849
commit 98364b3ed8
11 changed files with 85 additions and 55 deletions

@ -12,7 +12,8 @@
| Version | Build | | Version | Build |
|---------|-------| |---------|-------|
| v2306 | [Build][latest-build] | | v2312 | [Build][latest-build] |
| v2306 | [Build][v2306-build] |
| v2212 | [Build][v2212-build] | | v2212 | [Build][v2212-build] |
| v2206 | [Build][v2206-build] | | v2206 | [Build][v2206-build] |
| v2106 | [Build][v2106-build] | | v2106 | [Build][v2106-build] |

@ -24,15 +24,15 @@ overview:
``` ```
$ foamEtcFile -list $ foamEtcFile -list
$HOME/.OpenFOAM/2306 $HOME/.OpenFOAM/2312
$HOME/.OpenFOAM $HOME/.OpenFOAM
/path/OpenFOAM-v2306/site/2306/etc /path/OpenFOAM-v2312/site/2306/etc
/path/OpenFOAM-v2306/site/etc /path/OpenFOAM-v2312/site/etc
/path/OpenFOAM-v2306/etc /path/OpenFOAM-v2312/etc
``` ```
Both the *user* paths (located as `$HOME/.OpenFOAM/`) and the *group* Both the *user* paths (located as `$HOME/.OpenFOAM/`) and the *group*
paths (`/path/OpenFOAM-v2306/site/`) support additional API versioning paths (`/path/OpenFOAM-v2312/site/`) support additional API versioning
to allow different settings between releases. The **other** to allow different settings between releases. The **other**
corresponds to the settings shipped with a particular OpenFOAM release. corresponds to the settings shipped with a particular OpenFOAM release.
@ -133,7 +133,7 @@ mechanism allows direct setting of variables without needing to edit
any files. For example, to source the OpenFOAM environment with a any files. For example, to source the OpenFOAM environment with a
different compiler: different compiler:
``` ```
source /path/to/OpenFOAM-v2306 WM_COMPILER=Clang source /path/to/OpenFOAM-v2312 WM_COMPILER=Clang
``` ```
If the argument does not appear to be an assignment of a variable, it If the argument does not appear to be an assignment of a variable, it
will attempt to resolve it as a file and then source that. This will attempt to resolve it as a file and then source that. This
@ -155,9 +155,9 @@ export WM_LABEL_SIZE=64
``` ```
It is then possible to easily switch between different configurations: It is then possible to easily switch between different configurations:
``` ```
source /path/to/OpenFOAM-v2306 clang50-int64 source /path/to/OpenFOAM-v2312 clang50-int64
source /path/to/OpenFOAM-v2306 gcc82 source /path/to/OpenFOAM-v2312 gcc82
source /path/to/OpenFOAM-v2306 wingw source /path/to/OpenFOAM-v2312 wingw
``` ```
Armed with this information, the user should be able to make Armed with this information, the user should be able to make
adjustments to the OpenFOAM configuration with a good degree of adjustments to the OpenFOAM configuration with a good degree of
@ -172,7 +172,7 @@ the OpenFOAM directory to a fixed location (removing any bash
discovery magic): discovery magic):
``` ```
bin/tools/foamConfigurePaths \ bin/tools/foamConfigurePaths \
-project-path "/opt/openfoam2306" \ -project-path "/opt/openfoam2312" \
-boost boost-system \ -boost boost-system \
-cgal cgal-system \ -cgal cgal-system \
-fftw fftw-system \ -fftw fftw-system \

@ -68,21 +68,21 @@ until completion of a particular project.
The system installation prefix `/usr/lib/openfoam` is used, below The system installation prefix `/usr/lib/openfoam` is used, below
which individual versions are located. which individual versions are located.
For example, For example,
- `/usr/lib/openfoam/openfoam2312/`
- `/usr/lib/openfoam/openfoam2306/` - `/usr/lib/openfoam/openfoam2306/`
- `/usr/lib/openfoam/openfoam2212/` - `/usr/lib/openfoam/openfoam2212/`
- `/usr/lib/openfoam/openfoam2206/` - `/usr/lib/openfoam/openfoam2206/`
- `/usr/lib/openfoam/openfoam2112/` - `/usr/lib/openfoam/openfoam2112/`
- `/usr/lib/openfoam/openfoam2106/`
- ... - ...
The OpenFOAM bash session wrapper will be created under `/usr/bin`. The OpenFOAM bash session wrapper will be created under `/usr/bin`.
For example, For example,
- `/usr/bin/openfoam2312`
- `/usr/bin/openfoam2306` - `/usr/bin/openfoam2306`
- `/usr/bin/openfoam2212` - `/usr/bin/openfoam2212`
- `/usr/bin/openfoam2206` - `/usr/bin/openfoam2206`
- `/usr/bin/openfoam2112` - `/usr/bin/openfoam2112`
- `/usr/bin/openfoam2106`
- ... - ...
@ -95,7 +95,7 @@ need"_ approach [more control, less diskspace]. Another group of users
prefers the _"just install everything"_ approach [less control, more prefers the _"just install everything"_ approach [less control, more
diskspace]. diskspace].
We have attempted to strike a reasonable balance between both. For We have attempted to strike a reasonable balance between both. For
any given *base* package (e.g., `openfoam2306` etc), there are a variant any given *base* package (e.g., `openfoam2312` etc), there are a variant
of sub-packages (_"only-what-I-need"_), but also a `default` package for of sub-packages (_"only-what-I-need"_), but also a `default` package for
the _"install-everything"_ folks. the _"install-everything"_ folks.
@ -134,10 +134,10 @@ the same system, some installations use a meta-package structure:
|---------------|---------------| |---------------|---------------|
| openfoam | The top-level meta package that provides links and requirements for the most recent OpenFOAM release | | openfoam | The top-level meta package that provides links and requirements for the most recent OpenFOAM release |
| openfoam-selector | Similar to mpi-selector, used to switch active OpenFOAM versions | | openfoam-selector | Similar to mpi-selector, used to switch active OpenFOAM versions |
| openfoam2112 | The maintenance version for v2112 | | openfoam2306 | The maintenance version for v2306 |
| openfoam2106 | The maintenance version for v2106 | | openfoam2212 | The maintenance version for v2212 |
The version-specific packages (eg, `openfoam2306`, `openfoam2212`, ...) The version-specific packages (eg, `openfoam2312`, `openfoam2306`, ...)
install into distinct directories so that it is possible to have install into distinct directories so that it is possible to have
multiple versions available on your systems. multiple versions available on your systems.
The top-level `openfoam` package registers which of the The top-level `openfoam` package registers which of the

@ -42,9 +42,9 @@ the container description files from the
Select and edit the definitions to suit your purposes and build the Select and edit the definitions to suit your purposes and build the
image. For example, image. For example,
``` ```
apptainer build --fakeroot openfoam2306.sif openfoam-run_rocky.def apptainer build --fakeroot openfoam2312.sif openfoam-run_rocky.def
``` ```
which will build the file `openfoam2306.sif` from the image which will build the file `openfoam2312.sif` from the image
description file, using the [RockyLinux](rockylinux.org) base image. description file, using the [RockyLinux](rockylinux.org) base image.
A `.sif` extension (singularity image format) is often used for the A `.sif` extension (singularity image format) is often used for the
apptainer files but is not required. apptainer files but is not required.
@ -69,7 +69,7 @@ path (eg, `$HOME/bin` etc) and use it.
For example, For example,
``` ```
$ openfoam2306.sif $ openfoam2312.sif
``` ```
This will open an interactive shell with the OpenFOAM environment This will open an interactive shell with the OpenFOAM environment
@ -83,7 +83,7 @@ the default behaviour for the image and the internal run-script.
For example, For example,
``` ```
$ openfoam2306.sif $ openfoam2312.sif
``` ```
@ -92,25 +92,25 @@ $ openfoam2306.sif
It is also possible to use the image in batch mode. It is also possible to use the image in batch mode.
For example, For example,
``` ```
$ openfoam2306.sif blockMesh -help $ openfoam2312.sif blockMesh -help
``` ```
It is also possible to use as for running shell scripts. It is also possible to use as for running shell scripts.
For example, For example,
``` ```
$ openfoam2306.sif -c './Allrun' $ openfoam2312.sif -c './Allrun'
``` ```
Note that the entry point within the image itself also has some option Note that the entry point within the image itself also has some option
handling. handling.
For example, For example,
``` ```
$ openfoam2306.sif -help $ openfoam2312.sif -help
``` ```
--- ---
Copyright (C) 2022 OpenCFD Ltd. Copyright (C) 2022-2023 OpenCFD Ltd.
[apptainer]: https://apptainer.org [apptainer]: https://apptainer.org
[packaging-containers]: https://develop.openfoam.com/packaging/containers [packaging-containers]: https://develop.openfoam.com/packaging/containers

@ -13,10 +13,10 @@ curl https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get update sudo apt-get update
# Install preferred package. Eg, # Install preferred package. Eg,
sudo apt-get install openfoam2306-default sudo apt-get install openfoam2312-default
# Use the openfoam shell session. Eg, # Use the openfoam shell session. Eg,
openfoam2306 openfoam2312
``` ```
![!!](/icons/alert-triangle.svg) The packages do ***not*** contain ![!!](/icons/alert-triangle.svg) The packages do ***not*** contain
@ -58,7 +58,7 @@ which conveniently [bundles several operations](#description-install-script).
After this you should immediately be able to install your preferred After this you should immediately be able to install your preferred
OpenFOAM package. For example, OpenFOAM package. For example,
``` ```
sudo apt-get install openfoam2306-default sudo apt-get install openfoam2312-default
``` ```
If your Ubuntu installation is a somewhat older, you may also need to If your Ubuntu installation is a somewhat older, you may also need to
update the signing certificates first: update the signing certificates first:
@ -69,7 +69,7 @@ sudo apt-get update
After migrating from one version to another, you can remove the old After migrating from one version to another, you can remove the old
version with the usual commands. For example, version with the usual commands. For example,
``` ```
sudo apt-get autoremove openfoam2306-default sudo apt-get autoremove openfoam2312-default
``` ```
### Supported versions and distributions ### Supported versions and distributions
@ -93,9 +93,9 @@ descriptions, the following represent typical installation commands:
|User Group | Command | |User Group | Command |
|---------------|------------------| |---------------|------------------|
| minimalist | `sudo apt-get install openfoam2306` | | minimalist | `sudo apt-get install openfoam2312` |
| traditional | `sudo apt-get install openfoam2306-dev` | | traditional | `sudo apt-get install openfoam2312-dev` |
| everything | `sudo apt-get install openfoam2306-default` | | everything | `sudo apt-get install openfoam2312-default` |
### Installation locations ### Installation locations
@ -112,7 +112,7 @@ As documented in [precompiled packages - OpenFOAM environment](/precompiled#envi
After adding the repositories and installing a particular version of After adding the repositories and installing a particular version of
OpenFOAM, upgrade notifications should also appear OpenFOAM, upgrade notifications should also appear
(for example for `openfoam2306`): (for example for `openfoam2312`):
![ubuntu-upgrade](/images/ubuntu-update.png) ![ubuntu-upgrade](/images/ubuntu-update.png)
@ -155,7 +155,7 @@ export WM_PROJECT_DIR=/usr/share/openfoam
which means you should immediately be able to install which means you should immediately be able to install
your preferred OpenFOAM package. For example, your preferred OpenFOAM package. For example,
``` ```
sudo apt-get install openfoam2306-default sudo apt-get install openfoam2312-default
``` ```
- <em>Cannot find MPI library</em><br/> - <em>Cannot find MPI library</em><br/>

@ -64,7 +64,7 @@ corresponding [packaging/containers][packaging-containers] files.
OpenFOAM versions and image _flavours_. For example, OpenFOAM versions and image _flavours_. For example,
``` ```
$ chmod +x openfoam-docker $ chmod +x openfoam-docker
$ ln -sf openfoam-docker openfoam2306-run $ ln -sf openfoam-docker openfoam2312-run
``` ```
- Verify that the script (or link) can be executed, - Verify that the script (or link) can be executed,
and take a look at some of the available options: and take a look at some of the available options:
@ -85,7 +85,7 @@ been made, calling it without any arguments will bind in the local
directory and start the image with an OpenFOAM environment. directory and start the image with an OpenFOAM environment.
Eg, Eg,
``` ```
$ openfoam2306-run $ openfoam2312-run
``` ```
This will open an interactive shell with the OpenFOAM environment This will open an interactive shell with the OpenFOAM environment
@ -186,9 +186,9 @@ Some possible commands after installing (Linux only):
shows the local images available. For example, shows the local images available. For example,
``` ```
REPOSITORY TAG IMAGE ID CREATED SIZE REPOSITORY TAG IMAGE ID CREATED SIZE
opencfd/openfoam-run 2306 abcxxxxxxxxx N days ago 640MB opencfd/openfoam-run 2312 abcxxxxxxxxx N days ago 640MB
opencfd/openfoam-run latest abcxxxxxxxxx N days ago 640MB opencfd/openfoam-run latest abcxxxxxxxxx N days ago 640MB
opencfd/openfoam-dev 2306 defxxxxxxxxx N days ago 1.38GB opencfd/openfoam-dev 2312 defxxxxxxxxx N days ago 1.38GB
opencfd/openfoam-dev latest defxxxxxxxxx N days ago 1.38GB opencfd/openfoam-dev latest defxxxxxxxxx N days ago 1.38GB
... ...
``` ```

@ -34,6 +34,9 @@ _(Fedora users can possibly skip this part)_.
yum -y install dnf-plugins-core yum -y install dnf-plugins-core
yum -y config-manager --set-enabled PowerTools yum -y config-manager --set-enabled PowerTools
yum -y install epel-release yum -y install epel-release
# For RockyLinux:
crb enable
``` ```
Enable ***copr*** for OpenFOAM as per the Enable ***copr*** for OpenFOAM as per the
[copr documentation](https://docs.pagure.org/copr.copr/how_to_enable_repo.html) [copr documentation](https://docs.pagure.org/copr.copr/how_to_enable_repo.html)
@ -77,9 +80,9 @@ descriptions, the following represent typical installation commands:
|User Group | Command | |User Group | Command |
|---------------|------------------| |---------------|------------------|
| minimalist | `sudo yum install openfoam2306` | | minimalist | `sudo yum install openfoam2312` |
| traditional | `sudo yum install openfoam2306-devel` | | traditional | `sudo yum install openfoam2312-devel` |
| everything | `sudo yum install openfoam2306-default` | | everything | `sudo yum install openfoam2312-default` |
### Installation locations ### Installation locations

@ -12,10 +12,10 @@ _Precompiled packages (openSUSE)_ <br>
sudo zypper refresh sudo zypper refresh
# Install preferred package. Eg, # Install preferred package. Eg,
sudo zypper install openfoam2306-default sudo zypper install openfoam2312-default
# Use the openfoam shell session. Eg, # Use the openfoam shell session. Eg,
openfoam2306 openfoam2312
``` ```
![!!](/icons/alert-triangle.svg) The packages do ***not*** contain ![!!](/icons/alert-triangle.svg) The packages do ***not*** contain
@ -40,7 +40,7 @@ https://software.opensuse.org//download.html?project=science&package=openfoam
and follow the instructions there. and follow the instructions there.
Note that this is a meta-package and individual version downloads are also possible. Note that this is a meta-package and individual version downloads are also possible.
For example, For example,
https://software.opensuse.org//download.html?project=science&package=openfoam2306 https://software.opensuse.org//download.html?project=science&package=openfoam2312
If you already have the _Science_ repository registered on your system, If you already have the _Science_ repository registered on your system,
you should be able to install it directly with `zypper`: you should be able to install it directly with `zypper`:
@ -69,9 +69,9 @@ descriptions, the following represent typical installation commands:
|User Group | Command | |User Group | Command |
|---------------|------------------| |---------------|------------------|
| minimalist | `sudo zypper install openfoam2306` | | minimalist | `sudo zypper install openfoam2312` |
| traditional | `sudo zypper install openfoam2306-devel` | | traditional | `sudo zypper install openfoam2312-devel` |
| everything | `sudo zypper install openfoam2306-default` | | everything | `sudo zypper install openfoam2312-default` |
### Installation locations ### Installation locations

@ -76,6 +76,30 @@ this will cause issues. To avoid such problems, there are two possible solutions
or clone the repositories within this folder. Build OpenFOAM. or clone the repositories within this folder. Build OpenFOAM.
#### Graphical applications (X11) within WSL
To enable graphical applications such as ParaView, Gedit,
GNUPlot etc. to be launched directly from WSL2, the
following steps may be followed:
1. Download and install [VcXsrv](https://sourceforge.net/projects/vcxsrv/files/latest/download).
Make sure to disable "active access control" (set checkmark)
as well as "native OpenGL" (unset checkmark)
under "Extra Settings" in the installation wizard.
2. Define a display variable in your file. For example, by adding the line
```
export DISPLAY=$(awk '/nameserver /{ print $2; exit }' /etc/resolv.conf 2>/dev/null):0
```
to your `~/.bashrc` file
3. Run VcXsrv via XLaunch (installed with VcXsrv) or make sure an
instance of VcXsrv is running (check for icon in taskbar).
4. Launch graphical applications from the WSL terminal. For example,
```
gedit &
```
### Native-windows ### Native-windows
<a name="native"></a> <a name="native"></a>

@ -22,10 +22,11 @@ openfoam2112
openfoam2206 openfoam2206
openfoam2212 openfoam2212
openfoam2306 openfoam2306
openfoam2312
``` ```
To set a particular version To set a particular version
``` ```
$ openfoam-selector --set openfoam2306 $ openfoam-selector --set openfoam2312
``` ```
To query the current selection: To query the current selection:
``` ```
@ -45,7 +46,7 @@ next full login. This is to avoid a possible clash of environments
when a parallel job still being launched. Of course, you can still when a parallel job still being launched. Of course, you can still
simply source the corresponding `bashrc` file directly. For example, simply source the corresponding `bashrc` file directly. For example,
``` ```
$ source /usr/lib/openfoam/openfoam2306/etc/bashrc $ source /usr/lib/openfoam/openfoam2312/etc/bashrc
``` ```
---- ----

@ -12,7 +12,8 @@
Depending on your packaging system (or system administrator), Depending on your packaging system (or system administrator),
various OpenFOAM shell sessions may be available. For example, various OpenFOAM shell sessions may be available. For example,
``` ```
/usr/bin/openfoam -> openfoam2306 /usr/bin/openfoam -> openfoam2312
/usr/bin/openfoam2312
/usr/bin/openfoam2306 /usr/bin/openfoam2306
/usr/bin/openfoam2212 /usr/bin/openfoam2212
/usr/bin/openfoam2206 /usr/bin/openfoam2206
@ -23,7 +24,7 @@ can be used for an _interactive_ bash session, or to run a single
OpenFOAM command within the OpenFOAM environment. OpenFOAM command within the OpenFOAM environment.
Using the `-help` option for the respective shell session Using the `-help` option for the respective shell session
(e.g., `openfoam2306 -help`) displays some useful information. (e.g., `openfoam2312 -help`) displays some useful information.
## Purpose ## Purpose
@ -49,14 +50,14 @@ For example,
``` ```
$ openfoam $ openfoam
* Using: OpenFOAM-2306 (2306) - visit www.openfoam.com * Using: OpenFOAM-2312 (2312) - visit www.openfoam.com
* Build: ... * Build: ...
* Arch: label=32;scalar=64 * Arch: label=32;scalar=64
* Platform: linux64GccDPInt32Opt (mpi=sys-openmpi) * Platform: linux64GccDPInt32Opt (mpi=sys-openmpi)
OpenFOAM shell session - use 'exit' to quit OpenFOAM shell session - use 'exit' to quit
openfoam2306:~/ openfoam2312:~/
mark$ mark$
``` ```
@ -87,9 +88,9 @@ It is also possible to execute arbitrary shell sequences with the
well-known `-c` option. For example, well-known `-c` option. For example,
``` ```
$ openfoam2306 -c 'echo "openfoam=$WM_PROJECT_DIR uses $WM_OPTIONS"' $ openfoam2312 -c 'echo "openfoam=$WM_PROJECT_DIR uses $WM_OPTIONS"'
``` ```
yields: `openfoam=/usr/lib/openfoam/openfoam2306 uses linux64GccDPInt32Opt` yields: `openfoam=/usr/lib/openfoam/openfoam2312 uses linux64GccDPInt32Opt`
## Notes ## Notes