... | ... | @@ -16,81 +16,35 @@ which will be replaced by alternative content in the future. |
|
|
|
|
|
|System | Links | Status | Notes |
|
|
|
|---------------|--------------|----------------|---------------|
|
|
|
| [openSUSE science](https://build.opensuse.org/project/show/science) | package [openfoam](https://build.opensuse.org/package/show/science/openfoam), [download](https://software.opensuse.org//download.html?project=science&package=openfoam) | Actively maintained by OpenCFD | [notes](#opensuse) |
|
|
|
| [Fedora/CentOS/RedHat copr](https://copr.fedorainfracloud.org/coprs/openfoam/) | package [openfoam](https://copr.fedorainfracloud.org/coprs/openfoam/openfoam/) | In development by OpenCFD | [notes](#redhat) |
|
|
|
| [Debian science](https://salsa.debian.org/science-team/) | package [openfoam](https://salsa.debian.org/science-team/openfoam) - see [debian search](https://packages.debian.org/search?keywords=openfoam) and [tracker](https://tracker.debian.org/pkg/openfoam) | Maintained independently, with input from OpenCFD | [notes](#debian) |
|
|
|
| [spack](https://spack.readthedocs.io/) | package [openfoam](https://github.com/spack/spack/tree/develop/var/spack/repos/builtin/packages/openfoam/) | Actively maintained by OpenCFD | [notes](#spack) |
|
|
|
| [EasyBuild](https://easybuild.readthedocs.io/) | package [OpenFOAM](https://github.com/easybuilders/easybuild-easyconfigs/tree/master/easybuild/easyconfigs/o/OpenFOAM) | Maintained independently, with input from OpenCFD | |
|
|
|
| debian | _See [precompiled](/precompiled)_ | Actively maintained by OpenCFD | |
|
|
|
| RPM-based | _See [precompiled](/precompiled)_ | Actively maintained by OpenCFD | |
|
|
|
|
|
|
|
|
|
#### Package structure (RPM)
|
|
|
|
|
|
To allow smooth installation and use of multiple OpenFOAM versions on
|
|
|
the same system, we use the following structure:
|
|
|
|
|
|
| Package | Comments |
|
|
|
|---------------|---------------|
|
|
|
| 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
|
|
|
| openfoam1906 | The maintenance version for 1906 |
|
|
|
| openfoam1812 | The maintenance version for 1812 |
|
|
|
|
|
|
The version-specific packages (eg, `openfoam1906`, `openfoam1812`)
|
|
|
install into distinct directories so that it is possible to have
|
|
|
multiple versions available on your systems.
|
|
|
The top-level `openfoam` package registers which of the
|
|
|
version-specific packages corresponds to the current release.
|
|
|
|
|
|
<a name="openfoam-selector"></a>
|
|
|
Finally, the `openfoam-selector` package is used to register which
|
|
|
openfoam packages are installed on the system and allows the use to
|
|
|
select one of them.
|
|
|
To display which versions are installed:
|
|
|
```
|
|
|
$ openfoam-selector --list
|
|
|
|
|
|
openfoam
|
|
|
openfoam1806
|
|
|
openfoam1812
|
|
|
openfoam1906
|
|
|
```
|
|
|
To set a particular version
|
|
|
```
|
|
|
$ openfoam-selector --set openfoam1906
|
|
|
```
|
|
|
To query the current selection:
|
|
|
```
|
|
|
$ openfoam-selector --query
|
|
|
```
|
|
|
### spack
|
|
|
<a name="spack"></a>
|
|
|
|
|
|
Most people will find the `openfoam-selector-menu` more convenient to
|
|
|
use.
|
|
|
```
|
|
|
WARNING: Changes made to the openfoam-selector defaults
|
|
|
will not be visible until you start a new shell!
|
|
|
```
|
|
|
The installation of openfoam with spack will generally require the
|
|
|
latest (development version) of spack. If this is available, you can
|
|
|
install openfoam in various configurations and dependencies, but
|
|
|
typically can simply install directly:
|
|
|
|
|
|
***NOTE*** Similar to the behaviour of the mpi-selector, the values
|
|
|
registered via the `openfoam-selector` will not be activated until the
|
|
|
next full login. This is to avoid a possible clash of environments
|
|
|
when a parallel job still being launched. Of course, you can still
|
|
|
simply source the corresponding `bashrc` file directly. For example,
|
|
|
```
|
|
|
$ source /opt/openfoam1906/etc/bashrc
|
|
|
$ spack install openfoam
|
|
|
```
|
|
|
|
|
|
|
|
|
#### OpenFOAM session
|
|
|
<a name="openfoam-session"></a>
|
|
|
|
|
|
Depending on how your packaging system has done things, an `openfoam`
|
|
|
Depending on how your packaging system has handled things, an `openfoam`
|
|
|
session command may be available as an alternative to the
|
|
|
`openfoam-selector` mechanism.
|
|
|
On the openSUSE installation, for example:
|
|
|
```
|
|
|
/usr/bin/openfoam -> openfoam-1906
|
|
|
/usr/bin/openfoam-1812
|
|
|
/usr/bin/openfoam-1906
|
|
|
/usr/bin/openfoam -> openfoam1912
|
|
|
/usr/bin/openfoam1912
|
|
|
/usr/bin/openfoam-selector
|
|
|
/usr/bin/openfoam-selector-menu
|
|
|
```
|
... | ... | @@ -101,11 +55,11 @@ with an OpenFOAM environment and your usual `~/.bashrc` environment. |
|
|
```
|
|
|
$ openfoam
|
|
|
|
|
|
Using: OpenFOAM-1906 (patch=191103) - see www.OpenFOAM.com
|
|
|
Using: OpenFOAM-1912 - see www.openfoam.com
|
|
|
Arch: linux64GccDPInt32Opt (mpi=openmpi-system)
|
|
|
OpenFOAM shell session - use exit to quit
|
|
|
|
|
|
OpenFOAM-1906:~/
|
|
|
OpenFOAM-1912:~/
|
|
|
mark$
|
|
|
```
|
|
|
|
... | ... | @@ -128,88 +82,6 @@ Although the OpenFOAM environment is sourced *after* your home |
|
|
references from within your `~/.bashrc` file.
|
|
|
|
|
|
|
|
|
### openSUSE
|
|
|
<a name="opensuse"></a>
|
|
|
|
|
|
For openSUSE users, OpenCFD Ltd. is a maintainer on the community
|
|
|
Science Portal and provides RPM binary packages for the most recent
|
|
|
openfoam versions. The quick access is via the download page:
|
|
|
https://software.opensuse.org//download.html?project=science&package=openfoam
|
|
|
and follow the instructions there.
|
|
|
|
|
|
If you already have the Science repository registered on your system,
|
|
|
you should be able to install it directly with `zypper`:
|
|
|
```
|
|
|
sudo zypper install openfoam
|
|
|
```
|
|
|
Or with a graphical tool such as YaST2:
|
|
|
|
|
|
![YaST2](/images/Yast2-select-openfoam.png)
|
|
|
|
|
|
|
|
|
### Fedora/CentOS/RedHat
|
|
|
<a name="redhat"></a>
|
|
|
|
|
|
For RedHat-based system, OpenCFD Ltd. is currently using the
|
|
|
[copr](https://copr.fedorainfracloud.org/) infrastructure to provide
|
|
|
RPM packages. Enable copr for openfoam as per the documentation shown on
|
|
|
https://docs.pagure.org/copr.copr/how_to_enable_repo.html
|
|
|
|
|
|
For newer systems:
|
|
|
```
|
|
|
$ dnf copr enable openfoam/openfoam
|
|
|
```
|
|
|
Older systems:
|
|
|
```
|
|
|
$ yum install yum-plugin-copr
|
|
|
$ yum copr enable openfoam/openfoam
|
|
|
```
|
|
|
|
|
|
|
|
|
### Debian/Ubuntu
|
|
|
<a name="debian"></a>
|
|
|
|
|
|
Support for Debian is expected to further improve in the near future
|
|
|
with better use of the [openfoam-selector](#openfoam-selector)
|
|
|
and the [openfoam-session](#openfoam-session) mechanisms.
|
|
|
|
|
|
- https://packages.debian.org/source/unstable/openfoam (_unstable_ meaning newer)
|
|
|
- https://packages.debian.org/source/stable/openfoam (_stable_ meaning newer)
|
|
|
|
|
|
Note that the Debian packages may have been created with applications in
|
|
|
`/usr/bin` and configuration files under `/usr/share/openfoam/etc`.
|
|
|
In this case, you may need to manually define the location of the
|
|
|
OpenFOAM directory as follows:
|
|
|
```
|
|
|
export WM_PROJECT_DIR=/usr/share/openfoam
|
|
|
```
|
|
|
|
|
|
|
|
|
### spack
|
|
|
<a name="spack"></a>
|
|
|
|
|
|
The installation of openfoam with spack will generally require the
|
|
|
latest (development version) of spack. If this is available, you can
|
|
|
install openfoam in various configurations and dependencies, but
|
|
|
typically can simply install directly:
|
|
|
|
|
|
```
|
|
|
$ spack install openfoam
|
|
|
```
|
|
|
|
|
|
|
|
|
### Resources
|
|
|
|
|
|
To help with RPM-based systems, the following content is provided for
|
|
|
reference purposes, and to help when scripting:
|
|
|
|
|
|
|System | Files | Scripts |
|
|
|
|---------------|---------------|-----------------|
|
|
|
| common | [openfoamVERSION.spec](/packaging/common/openfoamVERSION.spec) [lintrc](/packaging/common/openfoam-rpmlintrc) | [create-tar](/packaging/common/create-tar.sh) |
|
|
|
| openSUSE | | |
|
|
|
| CentOS/RedHat | [openfoam-selector.spec](/packaging/redhat/openfoam-selector.spec) | [copr fetch](/packaging/redhat/copr-fetch.sh) |
|
|
|
|
|
|
|
|
|
### Different compiler versions
|
|
|
<a name="different-compiler-versions"></a>
|
|
|
|
... | ... | |