File: global_user_settings.md

package info (click to toggle)
code-saturne 7.0.2%2Brepack-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 62,868 kB
  • sloc: ansic: 395,271; f90: 100,755; python: 86,746; cpp: 6,227; makefile: 4,247; xml: 2,389; sh: 1,091; javascript: 69
file content (83 lines) | stat: -rw-r--r-- 3,618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!--
  This file is part of Code_Saturne, a general-purpose CFD tool.

  Copyright (C) 1998-2021 EDF S.A.

  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
  Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->

\page cs_ug_user_settings Setting up your environment

Shortcuts and command completion  {#sec_prg_environment_cs}
================================

It is recommended before running code_saturne to define an alias to the
`code_saturne` script (see [sec_prg_environement]), for example:

```
alias cs='${install_prefix}/bin/code_saturne'
```

where '${install_prefix} is the base directory where code_saturne and its components
have been installed.

This setting can be defined in the user's `.bashrc`,`.bash_alias`, or
equivalent files depending on the environment.
This step may be skipped if '${install_prefix} is in a standard location (such as
`/usr` or `/usr/local`), or if the code is already available as an environment module.

When using the *bash* shell, a completion file may be sourced so as to
allow for syntax auto-completion:
```
source ${install_prefix}/etc/bash_completion.d/code_saturne'.
```
This can alse  be defined in the user's `.bashrc` file.

When using multiple versions of the code, different aliases should be used for
each version.

Independently of these settings, using the absolute path to the `code_saturne`
command is always possible.

For more advanced settings, a [configuration file](@ref cs_user_configuration_file)
may be used.

Configuration file {#cs_user_configuration_file}
==================

A configuration file for code_saturne is available in `${install_prefix}/etc`.
This file can be useful as a post-install step for computing environments using a
batch system, for separate front-end and compute systems (such as some Cray systems),
or for coupling with Syrthes (see the installation documentation for more details).

A user may define a local configuration, by copying
`${install_prefix}/etc/code_saturne.cfg` (if present)
or `${install_prefix}/etc/code_saturne.cfg.template` to
`$HOME/.code_saturne.cfg`, then uncomment and define the applicable sections.

Note that this user configuration file's settings usually apply to all installed
code_saturne versions, so only the necessary options should be defined.

Two options in the `.code_saturne.cfg` file can be useful for the user:
* Set the temporary directory (see [sec_prg_temporarydirectory] for more details
  on the temporary execution directory).
* Set the mesh database directory: it is possible to indicate a path where
  meshes are stored. In this case, the GUI will propose this directory
  automatically for mesh selection. Without the GUI, it is
  then possible to fill in the `cs_user_scripts.py` file (see
  [sec_prg_stepbystepcalculation) with the name of the desired mesh of the
  database directory and the code will find it automatically (be careful if you
  have the same name for a mesh in the database directory
  and in the `MESH` directory: the mesh in `MESH` will be used).