so the write thread does not have to do any parallel communication. This avoids
the bugs in the threading support in OpenMPI.
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2669
- include amount of free system memory in profiling, which can give an
indication of when swapping is about to start
- profilingSummary utility to collect profiling from parallel
calculations. Collects profiling information from processor
directories and summarize the time spent and number of calls as (max
avg min) values.
- waitForSlave now return a Time::stopAtControls enumeration:
unknown: when lockfile has no specially recognized content.
endTime: when lockfile contains "status=done"
writeNow: when lockfile contains "action=writeNow"
nextWrite: when lockfile contains "action=nextWrite"
noWriteNow: when lockfile contains "action=noWriteNow"
These values can be used by the caller to terminate the master
(OpenFOAM) as desired in response to information placed there by the
slave process.
- expose the names of write and stopAt controls for reuse elsewhere and
provide a stopAtControls enum for 'unknown'
- track the requested number of sub-cycles (was previously a bool)
- the readList<T>(Istream&) function was introduced to handle command
-options with either a single or a list value, but was also used for
the #remove dictionary directive. However, the parsing was fragile
if the list did not start with a '('.
Now handle command-line arg/option list directly (via ITstream)
and #remove with special-purpose reading of a string or word list.
This removes ambiguity and reduces potential future problems.
STYLE: use ITstream instead of IStringStream for command-line lookups
- parses directly to a tokenList without a string copy.
- unknown options or missing option values now emit a shorter message
without the entire usage. This makes it easier to identify the errors
and is better aligned with the behaviour of GNU system tools.
====
$ simpleFoam -case
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-01234
Error: option '-case' requires an argument
See 'simpleFoam -help' for usage
====
- provide for reduced (-help) and full (-help-full) usage information.
In many cases the reduced usage provided sufficient and easier
to find the information.
- make -srcDoc an alias for -doc-source
- no warnings about option aliases for future dates.
- split now optionally retains empty substrings.
Added split on fixed field width.
- Foam::name() now formats directly into string buffer, which a
removes one layer of copying and also avoids using a non-constexpr
in the temporary.
STYLE: explicit type narrowing on zero-padded output for ensight
- allows (for example) splitting a user string on whitespace and
passing this to system as a list of arguments, thus bypassing any
implicit use of 'sh'.
- system() with optional background, for spawning processes.
- this makes them applicable to Foam::string, Foam::word etc
ENH: improvements to CStringList
- add strings() sublist variant which can be useful when handling
command arguments separately
- add construct from SubStrings.
- in rare cases we may wish to have command-line arguments that are
non-mandatory. This can now be reflected in the usage output, provided
that the argList::nonMandatoryArgs() has been used.
- added setRootCaseNonMandatoryArgs.H that applies the
argList::nonMandatoryArgs() settings and otherwise performs largely
as per setRootCase.H, except that the check for mandatory arguments
is deferred to later user code.