1
Setting runcase options
2
=======================
3
=======================
5
The user may choose not to use the preprocessor
6
(only for meshes in .tlc or .slc format) by setting
8
otherwise set SOLCOM=0 as a standard
9
WARNING: .slc and .tlc formats are obsolete and their use is deprecated.
11
-------------------------------
13
The variable COMMAND_REORIENT is used by the preprocessor to reorient cells and
14
faces in case of incorrect orientation.
16
COMMAND_REORIENT="--reorient"
18
If no correction is necessary, the variable COMMAND_REORIENT is left emtpy, as:
22
-------------------------------
24
To join meshes with the preprocessor, additional options must be defined:
25
- assign to the MESH variable the name of the meshes between " ".
26
- assign to the COMMAND_JOIN variable the joining option. It is recommended
27
to specify the color or group of the faces to be joined. If this can not
28
be done, the options -color or -group should not be used (but the cost of
29
the preprocessing will be higher and the process less robust). Selecting the
30
faces can be performed by other means (see the preprocessor help by ecs -h).
31
In the following example, the faces of color 3, 4 and 6 of the meshes
32
titi.des and toto.unv are joined as:
34
MESH="titi.des toto.unv"
35
COMMAND_JOIN="-j --color 3 4 6"
37
If no joining is necessary, the variable COMMAND_JOIN is left emtpy, as:
41
-------------------------------
43
when the Code_Saturne GUI is used, the user assigns the name of the
44
xml file to the variable PARAM. The file should be placed in
45
the directory DATA of the case.
47
-------------------------------
49
The variable COMMAND_CWF is used to cut the faces whose warp angle is larger
50
than a given tolerance (in degrees). For instance, if the tolerance
51
angle is 0.01 degrees (default value), the command reads:
53
COMMAND_CWF="--cwf 0.01"
55
If the user wants to use the mesh as obtained by the mesh generator,
56
COMMAND_CWF is left empty, as:
60
-------------------------------
62
When periodicity applies, COMMAND_PERIO is used by the preprocessor,
63
with the option --perio:
65
Two types of periodicity are possible: translation and rotation.
66
Translation : --perio --trans tx ty tz
67
(tx,ty,tz): vector components
68
Rotation : two methods are possible
69
- the angle, the direction and an invariant point are given:
70
--perio --rota --angle a --dir dx dy dz --invpt px py pz
71
a : angle in degrees (between -180 and +180)
72
(dx,dy,dz): rotation axis vector components
73
(px,py,pz): rotation invariant point components
74
- the matrix and an invariant point are given:
75
--perio --rota --matrix m11 m12 m13 m21 m22 m23 m31 m32 m33 --invpt px py pz
76
mij : matrix elements (line by line)
77
(px,py,pz): rotation invariant point components
79
Translation and rotation can be used together:
80
--perio --trans tx ty tz --rota --angle a
81
--dir dx dy dz -invpt px py pz
82
or --perio --trans tx ty tz --rota --matrix m11 m12 m13
86
The result is RoT (whatever the order of the rotation and translation in
89
Rotation and translation have to be consistant with each other.
91
It is better to use the faces where periodicity applies, by using the
92
property of these faces, with their color for instance (faces
93
can be selected by other means than their color: see ecs -h for more
94
details), for instance:
95
--perio --trans 10 0 0 --color 1 2
97
Up to 3 periodicity directions can be imposed (one per spacial direction),
99
--perio --trans 10 0 0 --perio --trans 0 1 0 --perio --trans 0 0 1
101
If periodicity does not apply, COMMAND_PERIO is left empty as:
105
Example ("\" shows the continuation of the command line):
107
COMMAND_PERIO="--perio --trans -10.2 0 0 --color 2 \
108
--perio --rota --angle 90 --dir 0 0 1 --invpt 0 0 0 \
110
--perio --trans 0 1 0 \
111
--rota --matrix 1 0 0 \
113
0 1 0 --invpt 0 0 -0.2"
115
-------------------------------
117
If coupling with SYRTHES applies, (only one fluid simulation coupled
118
with only one solid simulation), the necessary information is determined
119
automatically by inspecting the user subroutines.
121
For more complex (multiple) couplings, the script will have to be changed.
123
-------------------------------
125
If thermochemistry applies, the name of the thermochemistry data file
126
may be specified through THERMOCHEMISTRY_DATA. For example:
127
THERMOCHEMISTRY_DATA="dp_FCP"
129
-------------------------------
131
If meteo profiles are used, the name of the meteo data file
132
may be specified through METEO_DATA. For example:
135
-------------------------------
138
User input files can be specified with the USER_INPUT_FILE variable
139
(left empty if none are used) and the files are located in DATA.
141
-------------------------------
143
User output files to retrieve can be specified with USER_OUTPUT_FILE.
145
-------------------------------
147
The NUMBER_OF_PROCESSORS option defines the number of MPI processes to use
148
(ideally equal to the physical number of processors or cores, but this
149
is not mandatory). If the variable is left empty, it is determined
150
automatically (for PC's or workstations, NUMBER_OF_PROCESSORS is set to 1
151
and for clusters or supercomputers, it is set to the number of processors
152
reserved for the batch job).
153
When running a calculation through a batch system, it is not recommended
154
to force NUMBER_OF_PROCESSORS to a value different from the number of
155
processors required for the batch job, as oversubscribing may lead to
156
strongly degraded performance (and may even fail depending on the system's
157
mpi policy), and under-subscribing means reserving unused processors.
158
When running the script interactively (such as on a Linux PC),
159
NUMBER_OF_PROCESSORS may be set to a lower value than the number of
160
physical processors (to limit system load), or to a higher value
161
(usually for testing, as this reduces performance).
162
When coupling with SYRTHES using MPI, one process/processor is reserved
163
for SYRTHES, so the number of processors used for the kernel is
164
equal to nproc_kernel = NUMBER_OF_PROCESSORS - 1.
167
If we wish to specify distant machines (or are running on a cluster
168
with no batch system), the optional PROCESSOR_LIST string may be defined.
169
Running on multiple processors not reserved for this task is not recommended,
170
as load imbalance due to 1 processor running multiple jobs is enough to
171
degrade the performance for the whole job. Also, running in parallel without
172
a high performance network will lead to low performance (low latency being
173
even more important than high bandwidth).
175
PROCESSOR_LIST="machine1 cpu=nb_cpu1 user=userid1 & machine2 cpu=nb_cpu2 user=userid2"
176
PROCESSOR_LIST="machine1 & machine2"
177
The & separates 2 machines in the list. Fields are as follows:
178
machine1 and machine2 indicate machine names (as given by the
180
for example: chi80xx.der.edf.fr
181
nb_cpu1 and nb_cpu2 indicate the number of processors on hosts
182
machine1 and machine2
183
for example, on a dual-processor machine: cpu=2
184
userid1 and userid2 indicate the user's login on machine1 and machine2
185
Fields cpu= and user= are optional.
186
The machine from which the script is run will automatically be used with
187
most MPI environments.
188
Selected machines must use a shared filesystem (at least NFS) and all
189
be of the same general OS and architecture type.
191
-------------------------------
193
The CS_TMP_PREFIX variable allows the user to specify in which temporary
194
directory the calculation will run. If left empty, a default directory
195
will be used (architecture dependent). If a value is specified,
196
the temporary directory will be:
197
RUN=$CS_TMP_PREFIX/tmp_Saturne/$STUDY.$CASE.$DATE
199
Specifying CS_TMP_PREFIX may be useful for example on a workstation so
200
as to use a large local disk (CS_TMP_PREFIX=/local00/users/`whoami`
202
Under some batch systems, the default of TMPDIR may be destroyed after
203
each run, so to keep this temporary directory after the run,
204
another value must be specified (CS_TMP_PREFIX=$SCRATCHDIR for example).
206
-------------------------------
208
The EXEC_PREPROCESS, EXEC_PARTITION, and EXEC_KERNEL variables allow running
209
only some specific stages of the calculation, and saving them for future use.
210
if EXEC_KERNEL is set to no, the Preprocessor's preprocessor_output file
211
is copied in RESU, and the Partitioner's output is copied in a
212
PARTITION_OUTPUT directory in RESU. note also that when partitioning with no
213
kernel execution, the number of processors required is not known in advance,
214
so the PARTITION_LIST variable must be used to indicate which partitionings
215
are required. For example, PARTITION_LIST="128 256" will generate
216
2 partitionings, with files domain_number_128 and domain_number_256
217
in RESU/PARTITION_OUTPUT. The option "-no-perio" may also be added to
218
PARTITION_LIST if we do not want periodicity to be accounted for in the
220
If EXEC_PREPROCESS is set to no, a preprocessor_output file must be found in
221
DATA (typically, a symbolic link to a file in RESU).
222
If EXEC_PARTITION is set to no, a PARTITION_OUTPUT directory must be found
223
in DATA (typically, a symbolic link to a file in RESU). If no partitioning
224
is found, the calculation will continue, using an unoptimized partitioning,
225
which may impact performance.
227
-------------------------------
229
Option CS_LIB_ADD is more advanced, mainly for developers.
231
CS_LIB_ADD allows specifying external libraries to link. In this
232
case, the whole option to pass to the linker must be given.
234
CS_LIB_ADD="-L/home/saturne/opt/foo/lib -lfoo"
236
VALGRIND enables running of the Kernel through Valgrind if this
237
memory-checking tool is available (usually under Linux) To
240
possibly with specific options, such as for example
241
VALGRIND="valgrind --tool=memcheck"
242
If valgrind is not in the PATH, its full path must be specified.
244
ARG_CS_VERIF allows activation of elementary mesh quality tests,
245
as well as basic linear algebra operations micro-benchmarks.
246
="-q" : mesh quality criteria and test precision of gradient for
247
sin(x+2y+3z) with each calculation mode (IMRGRA from 0 to 4)
248
="--benchmark": basic linear algebra operation benchmark
249
="--benchmark --mpitrace" : same as benchmark, with operations run
250
only once, for use with MPI trace tools.
251
In mesh quality or benchmark mode, no parameter file or user
252
subroutine is needed.
254
ARG_CS_OUTPUT allows redirection of output.
255
The "--log" option allows redirecting output for a single-processor
256
run or for rank 0 of a parallel run.
257
"--log 0" output redirected to standard output
258
"--log 1" output redirected to a "listing" file (default behavior)
259
The "--logp" option allows redirection of output for ranks 1 to n-1
260
for a parallel run on n processors:
261
"--logp -1" turns off output for ranks > 0 (default behavior)
262
"--logp 0" sends all output to the standard output (useful if every
263
rank is associated to a different console, such as when running
265
"--logp 1" redirects all output from ranks 1 to n-1 to files
266
listing_n0002 to listing_n<N>.
267
Options --log and --logp may be specified together or separately
268
through the ARG_CS_OUTPUT variable.
270
ECHO_SYR_COMM allows for echo of communications on the SYRTHES 3 side.
271
This is only useful when debugging a coupled calculation.
272
To activate this options, assign a strictly positive value to
273
ECHO_SYR_COMM. For each message exchanged, the ECHO_SYR_COMM first
274
and last values will be printed (characters, integers, or doubles).
275
By default, the string is kept empty.
276
Reasonable activation value: