mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
update precompiled information, compiler config
@ -30,8 +30,10 @@ When [reporting a bug in OpenFOAM][foam-issues],
|
||||
please provide sufficient detail for us to understand your problem.
|
||||
This should include:
|
||||
- OpenFOAM version : determine by one of these methods:
|
||||
- `wmake -build-info` or `wmake -version` or `foamVersion`
|
||||
- From the `META-INFO/api-info` file. It contains version (api) information.
|
||||
- `wmake -build-info` or `wmake -version`
|
||||
- From the `META-INFO/api-info` and `META-INFO/build-info` files.
|
||||
They contains version (api) information.
|
||||
- From any OpenFOAM utility. Eg, `blockMesh -help`
|
||||
- Operating system, compiler, _etc_.
|
||||
- Check your installation by running `foamInstallationTest`. This will return an extended log, from which you can focus on the "Basic setup" and "Software Components" sections.
|
||||
- Find your Linux distribution and version by running `lsb_release -a`.
|
||||
@ -49,7 +51,7 @@ This should include:
|
||||
|
||||
----
|
||||
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
|
||||
[foam-issues]: https://develop.openfoam.com/Development/openfoam/-/issues
|
||||
|
||||
|
||||
136
building.md
136
building.md
@ -12,7 +12,8 @@
|
||||
|
||||
| Version | Build |
|
||||
|---------|-------|
|
||||
| v2106 | [Build][latest-build] |
|
||||
| v2112 | [Build][latest-build] |
|
||||
| v2106 | [Build][v2106-build] |
|
||||
| v2012 | [Build][v2012-build] |
|
||||
| v2006 | [Build][v2006-build] |
|
||||
| v1912 | [Build][v1912-build] |
|
||||
@ -96,6 +97,55 @@ See [cross-compilation](/building/cross-compile-mingw) for an example
|
||||
of its use.
|
||||
|
||||
|
||||
### Different compiler versions
|
||||
<a name="different-compiler-versions"></a>
|
||||
|
||||
By default, OpenFOAM handles newer/older non-system compilers as
|
||||
_ThirdParty_ installations and uses the combination of `WM_COMPILER`
|
||||
and `WM_COMPILER_TYPE` to select them. In some cases, however, it is
|
||||
more convenient to install prebuilt compiler binaries as *system*
|
||||
compilers (e.g., using deb or rpm packages). These compilers are
|
||||
typically distinguished by an additional version suffix (eg, `gcc-11`,
|
||||
`clang-13`, `clang-13.0` etc).
|
||||
|
||||
The `WM_COMPILE_CONTROL` environment can be used to add the additional
|
||||
resolution necessary. For example,
|
||||
```
|
||||
export WM_COMPILER=Gcc
|
||||
export WM_COMPILE_CONTROL="version=11"
|
||||
```
|
||||
This will add the suffix `-11` to the regular compiler names.
|
||||
Note, that is normally good practice to add some compiler version
|
||||
information into the build name as well. For example,
|
||||
```
|
||||
export WM_COMPILER=Clang130
|
||||
export WM_COMPILE_CONTROL="version=13.0"
|
||||
```
|
||||
Be certain to verify that the rules have actually been set as expected:
|
||||
```
|
||||
wmake -show-cxx
|
||||
wmake -show-path-cxx
|
||||
```
|
||||
|
||||
If this change represents your standard default compiler definition,
|
||||
then place the information into the `etc/prefs.sh` file (see the
|
||||
`etc/bashrc` file for some details) and re-source your OpenFOAM
|
||||
environment. If you would like to selectively enable this compiler
|
||||
definition, a common means is to place the same definition information
|
||||
into a user configuration file (for example, `~/.OpenFOAM/clang130`)
|
||||
and then specify that configuration when sourcing your OpenFOAM
|
||||
environment. For example,
|
||||
```
|
||||
source /path/to/OpenFOAM-version/etc/bashrc clang130
|
||||
```
|
||||
The `bashrc` will locate and use the configuration file, after which the
|
||||
compiler will be properly selected. Again, to verify everything has actually
|
||||
been set properly:
|
||||
```
|
||||
wmake -show-cxx
|
||||
wmake -show-path-cxx
|
||||
```
|
||||
|
||||
### Processor-specific handling
|
||||
<a name="processor-specific-handling"></a>
|
||||
|
||||
@ -114,87 +164,6 @@ optimization is fine) since these components only appear as part of the
|
||||
wmake build toolchain itself.
|
||||
|
||||
|
||||
### Different compiler versions
|
||||
<a name="different-compiler-versions"></a>
|
||||
|
||||
By default, OpenFOAM handles newer/older non-system compilers as
|
||||
_ThirdParty_ installations and uses the combination of `WM_COMPILER`
|
||||
and `WM_COMPILER_TYPE` to select them. In some cases, however, it can
|
||||
be much more convenient for the user to install prebuilt compiler
|
||||
binaries as *system* compilers (e.g., using deb or rpm packages).
|
||||
This poses a slight problem since the OpenFOAM build rules normally
|
||||
use the main compiler name (`gcc`, `clang` etc) without any additional
|
||||
version information, but the various *system* compilers are frequently
|
||||
installed with versioned names such as `gcc-8`, `clang-10` etc.
|
||||
|
||||
Here is a simple way to solve this, using clang-10 on openSUSE for the
|
||||
example:
|
||||
|
||||
1. Install the desired system compiler.
|
||||
In this case [clang-10 from tools:compiler][llvm10-opensuse] which
|
||||
installs `/usr/bin/clang-10` and `/usr/bin/clang++-10`.
|
||||
|
||||
2. Next override the OpenFOAM compiler calls, but without blindly
|
||||
rewriting everything.
|
||||
|
||||
We create a new directory for our special rules:
|
||||
```
|
||||
mkdir wmake/rules/linux64Clang100
|
||||
```
|
||||
Inside this directory, we add an general rules file
|
||||
(`wmake/rules/linux64Clang100/general`) with the following contents:
|
||||
```
|
||||
# Override compiler calls for llvm-10
|
||||
|
||||
cc = clang-10
|
||||
CC = clang++-10 -std=c++11
|
||||
```
|
||||
Or if this shall be restricted to system compilers only:
|
||||
```
|
||||
# Override system compiler calls for llvm-10
|
||||
ifeq (system,$(WM_COMPILER_TYPE))
|
||||
cc = clang-10
|
||||
CC = clang++-10 -std=c++11
|
||||
endif
|
||||
```
|
||||
|
||||
3. The final step is to select this compiler definition with the following
|
||||
combination:
|
||||
```
|
||||
# Preferences for system Clang100
|
||||
|
||||
export WM_COMPILER=Clang100
|
||||
export WM_COMPILER_TYPE=system
|
||||
```
|
||||
|
||||
If this change represents your standard default compiler definition,
|
||||
then place the information into the `etc/prefs.sh` file (see the
|
||||
`etc/bashrc` file for some details) and re-source your OpenFOAM
|
||||
environment.
|
||||
|
||||
If you would like to selectively enable this compiler definition, a
|
||||
common means is to place the same definition information into a user
|
||||
configuration file (for example, `~/.OpenFOAM/clang100`) and then
|
||||
specify that configuration when sourcing your OpenFOAM environment.
|
||||
For example,
|
||||
```
|
||||
source /path/to/OpenFOAM-version/etc/bashrc clang100
|
||||
```
|
||||
|
||||
The `bashrc` will locate and use the configuration file, after which the
|
||||
compiler will be properly selected. To verify that this is indeed the
|
||||
case:
|
||||
```
|
||||
wmake -show-cxx
|
||||
```
|
||||
should display the selected compiler.
|
||||
You may also wish to verify its path:
|
||||
```
|
||||
wmake -show-path-cxx
|
||||
```
|
||||
For older versions, `which $(wmake -show-cxx)` instead.
|
||||
|
||||
|
||||
--------
|
||||
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
@ -203,11 +172,10 @@ Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
|
||||
[latest-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||
|
||||
[v2206-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v2206/doc/Build.md
|
||||
[v2112-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v2112/doc/Build.md
|
||||
[v2106-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v2106/doc/Build.md
|
||||
[v2012-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v2012/doc/Build.md
|
||||
[v2006-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v2006/doc/Build.md
|
||||
[v1912-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v1912/doc/Build.md
|
||||
[v1906-build]: https://develop.openfoam.com/Development/openfoam/blob/maintenance-v1906/doc/Build.md
|
||||
|
||||
[llvm10-opensuse]: https://software.opensuse.org//download.html?project=devel%3Atools%3Acompiler&package=llvm10
|
||||
|
||||
@ -68,6 +68,7 @@ The overall preferences (etc-mingw/prefs.sh):
|
||||
export FOAM_CONFIG_ETC="etc-mingw"
|
||||
export WM_COMPILER=Mingw
|
||||
export WM_MPLIB=MSMPI
|
||||
unset WM_COMPILE_CONTROL # No tuning
|
||||
```
|
||||
|
||||
To disable CGAL (etc-mingw/config.sh/CGAL):
|
||||
@ -176,7 +177,7 @@ to ensure that the wmake binary toolchain is built for the _host_
|
||||
platform where it is needed.
|
||||
|
||||
|
||||
## Known limitations (2020-11-25)
|
||||
## Known limitations (2021-12-15)
|
||||
|
||||
- kahip does not build
|
||||
- ptscotch does not build
|
||||
@ -186,4 +187,4 @@ platform where it is needed.
|
||||
|
||||
--------
|
||||
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
|
||||
7
home.md
7
home.md
@ -11,7 +11,7 @@ to the latest version of [OpenFOAM](http://www.openfoam.com).
|
||||
*Quick links:*
|
||||
[][foam-repo]
|
||||
[][foam-issues]
|
||||
[*ParaView FAQ*][FAQ ParaView]
|
||||
[*ParaView FAQ*][faq paraview]
|
||||
|
||||
| Information | Comments |
|
||||
|---------------------|---------------------|
|
||||
@ -35,6 +35,7 @@ The [develop.openfoam.com][all-repos] site hosts the
|
||||
| [OpenFOAM][foam-repo] | [issues][foam-issues] |
|
||||
| [ThirdParty][third-repo] build scripts | [issues][third-issues] |
|
||||
| Additional [modules][all-modules] | _individual_ |
|
||||
| [packaging/containers][packaging-containers] | - |
|
||||
|
||||
Mirrors
|
||||
| [gitlab.com/openfoam](https://gitlab.com/openfoam/openfoam)
|
||||
@ -77,7 +78,7 @@ latest service offerings.
|
||||
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
|
||||
[FAQ ParaView]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||
[faq paraview]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||
|
||||
[upgrade-guide]: /upgrade/upgrade
|
||||
[code-devel]: /coding/git-workflow
|
||||
@ -95,3 +96,5 @@ Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
|
||||
[third-repo]: https://develop.openfoam.com/Development/ThirdParty-common/
|
||||
[third-issues]: https://develop.openfoam.com/Development/ThirdParty-common/-/issues
|
||||
|
||||
[packaging-containers]: https://develop.openfoam.com/packaging/containers
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 173 KiB |
1
packaging/suse/Locations.txt
Normal file
1
packaging/suse/Locations.txt
Normal file
@ -0,0 +1 @@
|
||||
add-science-repo.sh -> https://dl.openfoam.com/add-science-repo.sh
|
||||
33
packaging/suse/add-science-repo.sh
Normal file
33
packaging/suse/add-science-repo.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# Add openSUSE science repository
|
||||
#
|
||||
# Copyright (C) 2021 OpenCFD Ltd.
|
||||
# SPDX-License-Identifier: (GPL-3.0+)
|
||||
#
|
||||
# Usage
|
||||
# curl -s https://dl.openfoam.com/add-science-repo.sh | sudo bash
|
||||
# wget -q -O - https://dl.openfoam.com/add-science-repo.sh | sudo bash
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Repo name, location
|
||||
repo_name="science"
|
||||
zypp_repo_file="/etc/zypp/repos.d/${repo_name}.repo"
|
||||
repo_url='http://download.opensuse.org/repositories/science/openSUSE_Leap_$releasever/'
|
||||
|
||||
if [ -f "$zypp_repo_file" ]
|
||||
then
|
||||
echo "The '$repo_name' repo already exists - no need to add."
|
||||
else
|
||||
zypper -n addrepo --refresh --gpgcheck $repo_url "$repo_name"
|
||||
fi
|
||||
|
||||
# Update
|
||||
echo -n "Running zypper refresh ${repo_name}... "
|
||||
zypper refresh "$repo_name"
|
||||
|
||||
echo "$zypp_repo_file"
|
||||
echo
|
||||
echo "The repository is setup! You can now install packages."
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@ -15,6 +15,7 @@ features (such as reporting issues), users must create an account.
|
||||
| [OpenFOAM][foam-repo] | [issues][foam-issues] |
|
||||
| [ThirdParty][third-repo] build scripts | [issues][third-issues] |
|
||||
| Additional [modules][all-modules] | _individual_ |
|
||||
| [packaging/containers][packaging-containers] | - |
|
||||
|
||||
|
||||
[[_TOC_]]
|
||||
@ -149,7 +150,7 @@ multiple SSH keys and distinguish them with proper title.
|
||||
|
||||
----
|
||||
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
|
||||
[all-repos]: https://develop.openfoam.com/Development/
|
||||
[all-modules]: https://develop.openfoam.com/Development/openfoam/-/tree/develop/modules
|
||||
@ -164,3 +165,5 @@ Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
[develop]: https://develop.openfoam.com/Development/openfoam/tree/develop
|
||||
|
||||
[v1712-notes]: https://www.openfoam.com/news/main-news/openfoam-v1712
|
||||
|
||||
[packaging-containers]: https://develop.openfoam.com/packaging/containers
|
||||
|
||||
@ -27,7 +27,7 @@ For Debian and Ubuntu, OpenCFD works actively with the
|
||||
[Debian (science)](https://salsa.debian.org/science-team/)
|
||||
maintainers to [improve the packaging](https://salsa.debian.org/science-team/openfoam),
|
||||
but also provides its own [early-release Ubuntu repository](https://dl.openfoam.com/repos/deb)
|
||||
For Linux newcomers, note Ubuntu _is_ a Debian-derivative and thus its
|
||||
For Linux newcomers: _Ubuntu_ is a _Debian_-derivative and thus its
|
||||
repositories invariably contain references to _deb_ or _debian_.
|
||||
|
||||
|
||||
@ -46,25 +46,17 @@ curl -s https://dl.openfoam.com/add-debian-repo.sh | sudo bash
|
||||
```
|
||||
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
|
||||
```
|
||||
|
||||
This performs three things:
|
||||
|
||||
1. Adds the https://dl.openfoam.com/pubkey.gpg signing key for the repository
|
||||
2. Adds repository information for a given distribution (eg, _buster_, _focal_, etc.):
|
||||
which conveniently [bundles several operations](#description-install-script).
|
||||
After this you should immediately be able to install your preferred
|
||||
OpenFOAM package. For example,
|
||||
```
|
||||
deb [arch=amd64] https://dl.openfoam.com/repos/deb DIST main
|
||||
```
|
||||
3. Invokes `apt-get update` to refresh the repositories,
|
||||
which means you should immediately be able to install
|
||||
your preferred OpenFOAM package. For example,
|
||||
```
|
||||
sudo apt-get install openfoam2106-default
|
||||
sudo apt-get install openfoam2112-default
|
||||
```
|
||||
|
||||
After migrating from one version to another, you can remove the old
|
||||
version with the usual commands. For example,
|
||||
```
|
||||
sudo apt-get autoremove openfoam2106-default
|
||||
sudo apt-get autoremove openfoam2112-default
|
||||
```
|
||||
|
||||
### Supported versions and distributions
|
||||
@ -88,9 +80,9 @@ descriptions, the following represent typical installation commands:
|
||||
|
||||
|User Group | Command |
|
||||
|---------------|------------------|
|
||||
| minimalist | `sudo apt-get install openfoam2106` |
|
||||
| traditional | `sudo apt-get install openfoam2106-dev` |
|
||||
| everything | `sudo apt-get install openfoam2106-default` |
|
||||
| minimalist | `sudo apt-get install openfoam2112` |
|
||||
| traditional | `sudo apt-get install openfoam2112-dev` |
|
||||
| everything | `sudo apt-get install openfoam2112-default` |
|
||||
|
||||
|
||||
### Installation locations
|
||||
@ -135,14 +127,28 @@ export WM_PROJECT_DIR=/usr/share/openfoam
|
||||
- Archived [installer script](/packaging/debian/add-debian-repo.sh) contents that should appear on dl.openfoam.com/
|
||||
|
||||
|
||||
## Known problems
|
||||
## Frequently Asked Questions
|
||||
|
||||
### Cannot find MPI library
|
||||
- <em>What does the [installer script](https://dl.openfoam.com/add-debian-repo.sh)
|
||||
actually do?</em><br/>
|
||||
<a name="description-install-script"></a>
|
||||
- Adds the https://dl.openfoam.com/pubkey.gpg signing key for the repository
|
||||
- Adds repository information for a given distribution (eg, _buster_, _focal_, etc.):
|
||||
```
|
||||
deb [arch=amd64] https://dl.openfoam.com/repos/deb DIST main
|
||||
```
|
||||
- Invokes `apt-get update` to refresh the repositories,
|
||||
which means you should immediately be able to install
|
||||
your preferred OpenFOAM package. For example,
|
||||
```
|
||||
sudo apt-get install openfoam2112-default
|
||||
```
|
||||
|
||||
- <em>Cannot find MPI library</em><br/>
|
||||
This is a [very strange issue](https://develop.openfoam.com/Development/openfoam/-/issues/1817#note_49023)
|
||||
in which the Ubuntu triggers fails to properly link the mpi libraries.
|
||||
|
||||
Contents for `libopenmpi-dev` exist:
|
||||
The contents for `libopenmpi-dev` exist:
|
||||
```
|
||||
$ dpkg-query -L libopenmpi-dev | grep libmpi
|
||||
|
||||
|
||||
@ -4,9 +4,12 @@
|
||||
[](/precompiled)
|
||||
|
||||
_Precompiled packages (Docker)_ <br>
|
||||
***Quick-start***: <br>
|
||||
|
||||
**Quick-start:** <br>
|
||||
If docker is already installed and setup, simply download the
|
||||
[_openfoam-docker_][run-script] and run it.
|
||||
[_openfoam-docker_ script][run-script] and run it. Post-process with
|
||||
the [native ParaView][link paraview], for better performance and easy
|
||||
configuration. [Do _not_ bother with the paraFoam script][faq paraview].
|
||||
|
||||
----
|
||||
|
||||
@ -24,27 +27,12 @@ There are a variety of image flavours available:
|
||||
- `-dev` : runtime with OpenFOAM development environment
|
||||
- `-default` : _just-give-me-everything_ image
|
||||
|
||||
Containerization allow binaries compiled on a given Linux platform to
|
||||
run on other platforms (Linux, Windows, OSX) without significant
|
||||
degradation in performance. For data centres, containers are an
|
||||
attractive means of encapsulating applications.
|
||||
Containers allow binaries compiled on a given platform to run on other
|
||||
platforms (Linux, Windows, OSX) without significant degradation in
|
||||
performance. For data centres, containers are an attractive means of
|
||||
encapsulating applications.
|
||||
|
||||
### Installing Docker
|
||||
|
||||
- Get and install docker: https://docs.docker.com/engine/install/
|
||||
- Setup docker user: https://docs.docker.com/engine/install/linux-postinstall/
|
||||
|
||||
Some possible commands after installing:
|
||||
|
||||
| Command | Comment |
|
||||
|----------------|----------------|
|
||||
| `$ id` | Check that the user belongs to the _docker_ group |
|
||||
| `$ sudo /usr/sbin/usermod -aG docker $(whoami)` | Add current user to the _docker_ group
|
||||
| `$ docker info` | Verify the docker daemon is actually running |
|
||||
| `$ docker images` | List local images |
|
||||
|
||||
|
||||
## About the image
|
||||
### About the image
|
||||
|
||||
The current images uses the latest Ubuntu LTS version and are created
|
||||
following recipes similar or identical to those given in the
|
||||
@ -57,7 +45,7 @@ corresponding [packaging/containers][packaging-containers] files.
|
||||
- If you need install any tools _permanently_ in your docker image,
|
||||
use one of the docker files from the [packaging/containers
|
||||
repository][packaging-containers] as a template for creating your
|
||||
own custom image.
|
||||
own custom images.
|
||||
|
||||
|
||||
## Running OpenFOAM in a container
|
||||
@ -68,21 +56,28 @@ corresponding [packaging/containers][packaging-containers] files.
|
||||
OpenFOAM versions and image _flavours_. For example,
|
||||
```
|
||||
$ chmod +x openfoam-docker
|
||||
$ ln -sf openfoam-docker openfoam2106-run
|
||||
$ ln -sf openfoam-docker openfoam2112-run
|
||||
```
|
||||
- Verify that the script (or link) can be executed,
|
||||
and take a look at some of the available options:
|
||||
```
|
||||
$ openfoam-docker -help
|
||||
$ openfoam-docker -help-full
|
||||
```
|
||||
|
||||
This downloaded run script is the recommended means to enter the
|
||||
OpenFOAM image. Assuming that the corresponding link has been made,
|
||||
calling it without any arguments will bind in the local directory
|
||||
and start the image with an OpenFOAM environment.
|
||||
- Use the `-dry-run` option if you want to see how the script actually
|
||||
calls docker, without actually running anything.
|
||||
```
|
||||
$ openfoam-docker -dry-run
|
||||
```
|
||||
|
||||
The downloaded openfoam-docker run script is the recommended means to
|
||||
enter the OpenFOAM image. Assuming that a corresponding link has
|
||||
been made, calling it without any arguments will bind in the local
|
||||
directory and start the image with an OpenFOAM environment.
|
||||
Eg,
|
||||
```
|
||||
$ openfoam2106-run
|
||||
$ openfoam2112-run
|
||||
```
|
||||
|
||||
This will open an interactive shell with the OpenFOAM environment
|
||||
@ -100,7 +95,11 @@ the default behaviour for the image and run-script.
|
||||
|
||||
For example,
|
||||
```
|
||||
$ openfoam-docker
|
||||
|
||||
# With a different OpenFOAM version:
|
||||
$ openfoam-docker -2012
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -108,71 +107,120 @@ $ openfoam-docker -2012
|
||||
|
||||
It is also possible to use the image in batch mode. The key is to
|
||||
ensure that the run-script understands where the commands begin.
|
||||
For this, the standard `--` or `-` separator can be used. For
|
||||
potentially more readable input, a single isolated `/` also works.
|
||||
|
||||
For this, the standard `--` or `-` separators can be used, but a
|
||||
single isolated `/` also works and provides a nice visual separation.
|
||||
For example,
|
||||
```
|
||||
$ openfoam-docker -2012 -- blockMesh -help
|
||||
$ openfoam-docker / blockMesh -help
|
||||
```
|
||||
|
||||
It is also possible to use the run-script to run shell scripts.
|
||||
For example,
|
||||
```
|
||||
$ openfoam-docker -2012 -c './Allrun'
|
||||
$ openfoam-docker -c './Allrun'
|
||||
```
|
||||
|
||||
Note that the entry point within the image itself also has some option
|
||||
handling.
|
||||
For example,
|
||||
```
|
||||
$ openfoam-docker -2012 -- -help
|
||||
$ openfoam-docker / -help
|
||||
```
|
||||
|
||||
|
||||
## Frequently Asked Questions about Docker
|
||||
## Installing Docker
|
||||
|
||||
- _Is there any performance degradation when running via Docker?_<br/>
|
||||
- On Linux, the docker should run as quickly natively hosted code.
|
||||
- Get and install docker: https://docs.docker.com/engine/install/
|
||||
- Setup docker user: https://docs.docker.com/engine/install/linux-postinstall/
|
||||
|
||||
Some possible commands after installing (Linux only):
|
||||
|
||||
| Command | Comment |
|
||||
|----------------|----------------|
|
||||
| `$ id` | Check that the user belongs to the _docker_ group |
|
||||
| `$ sudo /usr/sbin/usermod -aG docker $(whoami)` | Add current user to the _docker_ group
|
||||
| `$ docker info` | Verify the docker daemon is actually running |
|
||||
| `$ docker images` | List local images |
|
||||
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
- <em>Is there any performance degradation when running via Docker?</em><br/>
|
||||
- On Linux the docker should run as quickly natively hosted code.
|
||||
- On Windows and OSX there is a slight performance penalty,
|
||||
largely related to I/O.
|
||||
- _How do I check if the OpenFOAM image has been downloaded correctly?_<br/>
|
||||
Type the command
|
||||
- <em>Why is slow on ARM-based machines?</em><br/>
|
||||
Since the standard docker images are AMD64-based, the _AMD64_
|
||||
emulation layer is cause of the slowdown here. If you just want to
|
||||
test a few commands this probably will not bother you, but if you want
|
||||
to use OpenFOAM more extensively you need an ARM64-based image. See
|
||||
next question.
|
||||
|
||||
- <em>Can I rebuild my own image?</em><br/>
|
||||
This is no problem. All of the files needed are provided on the
|
||||
[packaging/containers][packaging-containers] repository.<br/>
|
||||
If you have an ARM-based machine, you should use the openSUSE Leap
|
||||
components (see the openfoam-run_leap.Dockerfile from the repo).
|
||||
The standard images are usually AMD64 Ubuntu images and the Ubuntu
|
||||
OpenFOAM packages for ARM may be outdated or missing. However, the
|
||||
OpenFOAM ARM packages for openSUSE Leap are fully aligned.
|
||||
|
||||
- <em>Can I reuse the docker images?</em><br/>
|
||||
That is the beauty of containers. Simply start from any given image
|
||||
(include these OpenFOAM images) and define your own layers.
|
||||
|
||||
- <em>How do I check if the OpenFOAM image has been downloaded correctly?</em><br/>
|
||||
The command
|
||||
```
|
||||
$ docker images
|
||||
```
|
||||
to show the images available in Docker environment. For example,
|
||||
shows the local images available. For example,
|
||||
```
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
opencfd/openfoam2106-run latest xxxxxxxxxxxx N days ago 640MB
|
||||
opencfd/openfoam2106-dev latest xxxxxxxxxxxx N days ago 1.38GB
|
||||
opencfd/openfoam2112-run latest xxxxxxxxxxxx N days ago 640MB
|
||||
opencfd/openfoam2112-dev latest xxxxxxxxxxxx N days ago 1.38GB
|
||||
...
|
||||
```
|
||||
If you receive an error message about not being able to contact the Docker
|
||||
daemon check that:
|
||||
- the Docker daemon is started at boot time
|
||||
- the user account is in the _docker_ group (see output from the `id` command)
|
||||
|
||||
- <em>I prefer to use **podman** instead of **docker**</em><br/>
|
||||
No worries, like `openfoam-docker -help-full` shows, that option is
|
||||
also available:
|
||||
```
|
||||
$ openfoam-docker -podman
|
||||
```
|
||||
How do I check if the OpenFOAM image has been downloaded correctly?_<br/>
|
||||
|
||||
- <em>Where are my files?</em><br/>
|
||||
The user files inside Docker are visible (_ie_, mounted) in your home area
|
||||
and can be operated on just like any other file.
|
||||
|
||||
- <em>Why doesn't `paraFoam` display?</em><br/>
|
||||
Make sure that your machine's software is fully up-to-date. See if you can
|
||||
start a simple X-windows, non-graphics program (for example, `xterm`).
|
||||
If this does not come up there may be a problem with the _xhost_ access to
|
||||
the host screen. This is one of the steps inside the _startOpenFOAM_ script.
|
||||
An alternative remedy is to install the native ParaView version for your
|
||||
system, and use the built-in OpenFOAM reader and/or OpenFOAM data
|
||||
conversion tools such as `foamToVTK`.
|
||||
We previously had a long answer here about X-windows access etc, but
|
||||
in our experience it is simply not worth running paraview within the
|
||||
docker image. It is much simpler and has better performance to run
|
||||
ParaView natively on the host operating systems directly.
|
||||
Use the built-in OpenFOAM reader and/or OpenFOAM data conversion
|
||||
tools such as `foamToVTK`.
|
||||
|
||||
- <em>How do I run parallel?</em><br/>
|
||||
Same as any other OpenFOAM installation, _e.g._: `mpirun -np 2 icoFoam -parallel`
|
||||
Same as any other OpenFOAM installation,
|
||||
_e.g._: `mpirun -np 2 icoFoam -parallel`
|
||||
|
||||
- <em>How do I run parallel on multiple computers?</em><br/>
|
||||
This is not trivial inside the Docker environment. Also you might want to
|
||||
include optimised communication libraries (MPI) so it probably makes more
|
||||
sense to [perform a native compilation](/building)
|
||||
|
||||
- <em>How do I compile code?</em><br/>
|
||||
The Docker environment contains a full OpenFOAM development environment so
|
||||
all `wmake`, `wclean` _etc._ commands work (it is running the actual
|
||||
environment OpenFOAM was compiled in!)
|
||||
There are various docker images available, if you use the `-dev` or
|
||||
`-default` versions, they contains a full OpenFOAM development
|
||||
environment so all `wmake`, `wclean` _etc._ commands work (it is
|
||||
running the actual environment OpenFOAM was compiled in!)
|
||||
|
||||
- <em>Program XYZ is missing in the container, how do I install it?</em><br/>
|
||||
Follow the information in the welcome banner (local help) for managing
|
||||
_sudo_. Any programs installed within the container will disappear
|
||||
@ -187,3 +235,6 @@ Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
[packaging-containers]: https://develop.openfoam.com/packaging/containers
|
||||
[dockerhub-opencfd]: https://hub.docker.com/u/opencfd
|
||||
[run-script]: https://develop.openfoam.com/packaging/containers/-/raw/main/openfoam-docker
|
||||
|
||||
[link paraview]: https://www.paraview.org/download/
|
||||
[faq paraview]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||
|
||||
@ -84,7 +84,7 @@ As documented in [precompiled packages - OpenFOAM environment](/precompiled#envi
|
||||
|
||||
|System | Links | Status | Notes |
|
||||
|---------------|--------------|----------------|---------------|
|
||||
| [Fedora/CentOS/RedHat copr](https://copr.fedorainfracloud.org/coprs/openfoam/) | package [openfoam](https://copr.fedorainfracloud.org/coprs/openfoam/openfoam/) | In development by OpenCFD | |
|
||||
| [Fedora/CentOS/RedHat copr](https://copr.fedorainfracloud.org/coprs/openfoam/) | package [openfoam](https://copr.fedorainfracloud.org/coprs/openfoam/openfoam/) | Developed by OpenCFD | |
|
||||
|
||||
|
||||
---
|
||||
|
||||
@ -3,14 +3,21 @@
|
||||
[](/home)
|
||||
[](/precompiled)
|
||||
|
||||
_Precompiled packages (MS-Windows)_
|
||||
_Precompiled packages (MS-Windows)_ <br>
|
||||
|
||||
**Note:** <br>
|
||||
<em>
|
||||
Post-process with the [native ParaView][link paraview], for better
|
||||
performance and easy configuration. [Do _not_ bother with the paraFoam
|
||||
script][faq paraview].
|
||||
</em>
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||
##  MS-Windows
|
||||
|
||||
There are currently three different ways to run OpenFOAM on MS-Windows
|
||||
(10 or newer). These are listed in the likely order of preference:
|
||||
There are three different ways to run OpenFOAM on MS-Windows (10 or newer).
|
||||
These are listed in the likely order of preference:
|
||||
|
||||
1. [WSL/WSL2][link wsl] : Windows Subsystem for Linux<br>
|
||||
Many OpenFOAM users like WSL (_Windows Subsystem for Linux_) since
|
||||
@ -18,21 +25,14 @@ There are currently three different ways to run OpenFOAM on MS-Windows
|
||||
applications, use dynamic code compilation, and install additional
|
||||
programs.<br>
|
||||
Additionally, the OpenFOAM Linux packages are kept more up-to-date
|
||||
than the cross-compiled or docker variants.
|
||||
|
||||
2. Native Windows: Cross-compiled Windows binaries (mingw).<br>
|
||||
than cross-compiled or docker variants.
|
||||
2. _Native Windows_ : Cross-compiled Windows binaries (mingw).<br>
|
||||
Provides a quick means of using OpenFOAM on windows, but does not
|
||||
currently include an OpenFOAM development environment
|
||||
(ie, cannot compile code, no dynamic code)
|
||||
|
||||
3. Docker container: [docker-windows]<br>
|
||||
3. _Docker container_ : [docker-windows]<br>
|
||||
Equivalent to the WSL approach, except that the entire OpenFOAM
|
||||
installation is _containerized_ for easier management.
|
||||
|
||||
___It is recommended to perform post-processing with the native
|
||||
ParaView for Windows.___ <br>
|
||||
This should have better performance and is easier to configure.
|
||||
Simply [download ParaView for windows][link paraview] directly.
|
||||
installation is managed as a _container_.
|
||||
|
||||
|
||||
### Windows Subsystem for Linux
|
||||
@ -61,9 +61,7 @@ https://dl.openfoam.com/source/latest/OpenFOAM-windows-mingw.exe
|
||||
|
||||
1. **Install Docker**:
|
||||
Follow the [Docker for windows][docker-windows] information.
|
||||
|
||||
2. Follow the general [OpenFOAM + Docker](/precompiled/docker)
|
||||
information.
|
||||
2. Follow general [OpenFOAM + Docker](/precompiled/docker) information.
|
||||
|
||||
|
||||
--------
|
||||
@ -73,3 +71,4 @@ Copyright (C) 2021 OpenCFD Ltd.
|
||||
[docker-windows]: https://docs.docker.com/docker-for-windows/install/
|
||||
[link wsl]: https://docs.microsoft.com/en-gb/windows/wsl/install-win10
|
||||
[link paraview]: https://www.paraview.org/download/
|
||||
[faq paraview]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||
|
||||
Reference in New Issue
Block a user