Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Wiki
  • precompiled

precompiled · Changes

Page history
Relocate cross-compilation (mingw) from code repo authored Jul 28, 2020 by Mark Olesen's avatar Mark Olesen
- a wiki location seems to be more reasonable

Separate page for "running"

- collect information for shell session and openfoam-selector, which
  was previously scatttered in various places

Rename "page-build-code" to "building", with symlink for old location

Misc style changes
Hide whitespace changes
Inline Side-by-side
precompiled.md
View page @ d927e029
<!-- --- title: Precompiled Packages -->
[![home](/icons/home.svg "wiki home")](/home)
[![build](/icons/cpu.svg "build")](/building)
[![running](/icons/play.svg "running")](/running)
[[_TOC_]]
## Precompiled packages
To make OpenFOAM more readily available to a larger range of users,
OpenCFD works actively together with the community surrounding
To make OpenFOAM readily available to a larger range of users,
OpenCFD works actively with the community surrounding
respective Linux distributions to provide precompiled binary
installations as system packages. The distributions currently include
the following:
|System |
| System |
|---------------|
| [Debian/Ubuntu](/precompiled/debian) |
| [openSUSE](/precompiled/suse) |
| [CentOS/RedHat/Fedora](/precompiled/redhat) |
Of these, Debian/Ubuntu and openSUSE generally receive first attention:
Debian/Ubuntu and openSUSE generally receive first attention:
1. Debian/Ubuntu is a very popular distribution with OpenFOAM users.
2. OpenSUSE is historically our internal development platform. Since
......@@ -26,7 +24,23 @@ Of these, Debian/Ubuntu and openSUSE generally receive first attention:
well-crafted spec file to subsequently address RedHat-based
distributions.
### Installation Locations
[[_TOC_]]
## Using the OpenFOAM package
<a name="using"></a>
After installation, the OpenFOAM environment can be accessed as
described in [running](/running).
- The Debian and RPM packages **always** include the
[OpenFOAM shell sessions](/running/shell-session).
- If the `openfoam-selector` is available at the time of installation,
the newly installed packages will be registered with it, allowing
use of the [openfoam-selector](/running/openfoam-selector)
mechanism.
## Installation Locations
<a name="locations"></a>
The packages have been designed to allow simultaneous installation of
......@@ -50,7 +64,7 @@ For example,
- ...
### Sub-packages
## Sub-packages
<a name="sub-packages"></a>
Satisfying the wishes and requirements of all users is a difficult
......@@ -89,137 +103,26 @@ kept very similar, except `dev` (Debian) vs. `develop` (RPM) names
that follow the respective system conventions.
### After installation - using the OpenFOAM environment
<a name="environment"></a>
The [OpenFOAM bash session wrapper](#openfoam-session) provide the
simplest means of starting OpenFOAM immediately. For example,
```
$ openfoam1912
```
This can be used for an interactive bash session, or to run a single
OpenFOAM command within the OpenFOAM environment.
For a persistent OpenFOAM environment, the OpenFOAM bashrc file can be
sourced from your ~/.bashrc file by adding a line resembling the
following to that file:
```
source /usr/lib/openfoam/openfoam1912/etc/bashrc
```
The exact path used will change depending on the OpenFOAM version.
Never attempt to embed the shell session wrapper as part of your
`~/.bashrc` - this may cause an infinite loop!
#### Package structure (RPM)
## Package structure (RPM, partly Debian)
To allow smooth installation and use of multiple OpenFOAM versions on
the same system, some installations use a meta-package 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 |
| 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 |
| openfoam2006 | The maintenance version for 2006 |
| openfoam1912 | The maintenance version for 1912 |
The version-specific packages (eg, `openfoam1906`, `openfoam1812`)
The version-specific packages (eg, `openfoam2006`, `openfoam1912`)
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
```
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!
```
***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
```
#### OpenFOAM session
<a name="openfoam-session"></a>
Depending on how your packaging system has done 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 -> openfoam1912
/usr/bin/openfoam1912
/usr/bin/openfoam-selector
/usr/bin/openfoam-selector-menu
```
Using `openfoam -help` displays some useful information.
Calling it without any arguments opens an interactive *bash* session
with an OpenFOAM environment and your usual `~/.bashrc` environment.
```
$ openfoam
Using: OpenFOAM-1912 - see www.openfoam.com
Arch: linux64GccDPInt32Opt (mpi=openmpi-system)
OpenFOAM shell session - use exit to quit
OpenFOAM-1912:~/
mark$
```
If called with arguments, it will setup an OpenFOAM environment before
executing a single command. For example,
```
$ blockMesh -help
blockMesh: Command not found.
$ openfoam blockMesh -help
Usage: blockMesh [OPTIONS]
Options:
...
```
Although the OpenFOAM environment is sourced *after* your home
`~/.bashrc`, it is advisable to ensure that there are no circular
references from within your `~/.bashrc` file.
### Package Links
## Package Links
<a name="packaging"></a>
|System | Links | Status | Notes |
......@@ -229,7 +132,7 @@ references from within your `~/.bashrc` file.
| [Fedora/CentOS/RedHat copr](https://copr.fedorainfracloud.org/coprs/openfoam/) | package [openfoam](https://copr.fedorainfracloud.org/coprs/openfoam/openfoam/) | In development by OpenCFD | [notes](/precompiled/redhat) |
### Resources
## Resources
For precompiled packaging, the following content is provided for
reference purposes, and to help when scripting:
......@@ -240,14 +143,3 @@ reference purposes, and to help when scripting:
| openSUSE | | |
| CentOS/RedHat | [openfoam-selector.spec](/packaging/redhat/openfoam-selector.spec) | [copr fetch](/packaging/redhat/copr-fetch.sh) |
| debian/ubuntu | | [add repo](/packaging/debian/add-debian-repo.sh) |
--------
[foam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
[latest-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
[latest-cross]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Cross-Compile-mingw.md
[v1906-notes]: https://www.openfoam.com/releases/openfoam-v1906/
[llvm9-opensuse]: https://software.opensuse.org//download.html?project=devel%3Atools%3Acompiler&package=llvm9
Clone repository
  • Submitting issues
  • building
  • building
    • cross compile mingw
  • coding
    • git workflow
    • patterns
      • HashTable
      • dictionary
      • memory
      • patterns
      • precision
      • selectors
      • strings
    • style
      • style
  • configuring
  • Home
  • icons
    • info
View All Pages