Main program for Dynamic Load Balance Use Case¶
main
is a function defined in loadbalance.c.
Synopsis:
-
int
main
(int argc, char **argv)¶
Formal Arguments:
argc
: command line argument countargv
: command line arguments
Description: This is the main code for the dynamic load balance use case.
Here are the command-line options…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | -multifile
each cycle output will be written to different files. Otherwise, it will all be written to one file.
-numToShift %d
specify the number of elements to shift on each step [10].
-meshSize %d %d %d
specify size of mesh in 1, 2 or 3 dimensions. Specify 0 for each dimension you do not want to have.
For example, -meshSize 5 0 0 specifies a 1D mesh of size 5 elements [10 10 0]
-histElem %d
specify an element, using a global element id, whose pressure history is to displayed at the
end of the run. In this case, the database is closed and then re-opened. For each instant of the mesh in
the database, the specified element's pressure is is found by first finding which processor set the
element was assigned to. This find step is done in parallel. Once the processor-set is known, that
processor re-opens the database and reads the field, using partial I/O on that specifc set for the
specific element and prints a value. If you want to specify an element that you know has been
shifted, use an element id within <numToShift> elements of the highest element number.
|
Issues: Only two of the proc-to-top subset relations are different in each step. It would be nice to re-use the
data already written when the relations are identical to some other previous step. A function such as
saf_usewritten_rel``(``SAF__Rel
theRel, SAF__Rel
alreadyWrittenRel); would do the job.
It might be nice to provide a -histNode command-line option. Node history is a little different because some nodes are shared between processors.
This is intended to be only a parallel client. In serial, this example should be skipped.
This is really only a parallel test. It doesn’t make much sense to run it in serial
See Also:
- Dynamic Load Balance Use Case: Introduction for current chapter