|
|
<!-- --- title: openfoam-selector -->
|
|
|
|
|
|
[![home](/icons/home.svg "wiki home")](/home)
|
|
|
[![running](/icons/play.svg "running")](/running)
|
|
|
|
|
|
The `openfoam-selector` package is used to register which
|
|
|
openfoam packages are installed on the system and allows the user or
|
|
|
system administrator select one of them.
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
Depending on your packaging system (or system administrator),
|
|
|
`openfoam-selector` and `openfoam-selector-menu` commands may be
|
|
|
available to define the preferred OpenFOAM version for the ***login***
|
|
|
shell.
|
|
|
|
|
|
To display which versions are installed:
|
|
|
```
|
|
|
$ openfoam-selector --list
|
|
|
|
|
|
openfoam
|
|
|
openfoam1812
|
|
|
openfoam1906
|
|
|
openfoam1912
|
|
|
openfoam2006
|
|
|
```
|
|
|
To set a particular version
|
|
|
```
|
|
|
$ openfoam-selector --set openfoam2006
|
|
|
```
|
|
|
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 /usr/lib/openfoam/openfoam2006/etc/bashrc
|
|
|
``` |