.. # JUBE Benchmarking Environment
# Copyright (C) 2008-2024
# Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre
# http://www.fz-juelich.de/jsc/jube
#
# 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 3 of the License, or
# 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, see .
Glossary
========
.. glossary::
:sorted:
output
Shows path and content of the stdout and stderr files of the given benchmark.
If no benchmark id is given, last benchmark found in will be used.
remove
The given benchmark will be removed.
If no benchmark id is given, last benchmark found in directory will be removed.
Only the *JUBE* internal directory structure will be deleted.
External files and directories will stay unchanged.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
comment
Add or manipulate the comment string.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
info
Show info for the given benchmark directory, a given benchmark or a specific
step.
If benchmark directory is missing, current directory will be used.
log
Show logs for the given benchmark directory or a given benchmark.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
status
Show status string (RUNNING or FINISHED) for the given benchmark.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
tag
Show tag description for the given input file, the given benchmark directory or a specific benchmark.
If path to input file or benchmark directory is missing, current directory will be used. If no benchmark id is given,
last benchmark found in directory will be used.
continue
Continue an existing benchmark. Not finished steps will be continued,
if they are leaving pending mode.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
analyse
Analyse an existing benchmark. The analyser will scan through all files given
inside the configuration by using the given patternsets.
If no benchmark id is given, last benchmark found in directory will be used. If benchmark directory is missing, current
directory will be used.
run
Start a new benchmark run by parsing the given *JUBE* input file.
update
Check if a newer JUBE version is available.
result
Create a result table.
If no benchmark id is given, last benchmark found in directory will be used. If multiple benchmarks are selected (e.g. by using ``--id all``), a combined result
view of all available benchmarks in the given directory will be created. If benchmark directory is missing, current directory will be used.
complete
Generate shell completion.
benchmark_tag
The main benchmark definition
.. code-block:: xml
...
* container for all benchmark information
* benchmark-name must be unique inside input file
* ``outpath`` contains the path to the root folder for benchmark runs
* multiple benchmarks can use the same folder
* every benchmark and every (new) run will create a new folder (named by an unique benchmark id) inside this given ``outpath``
* the path will be relative to input file location
include-path_tag
Add some include paths where to search for include files.
.. code-block:: xml
...
...
* the additional path will be scanned for include files
comment_tag
Add a benchmark specific comment. These comment will be stored inside the benchmark directory.
.. code-block:: xml
...
tags_tag
Specify tag description and combination of tags that must be set.
.. code-block:: xml
......
* ``forced`` is optional, if it is set to ``true``, you will be forced to describe every possible tag. (default: ``false``)
* multiple ```` and ```` are allowed
* In the ````, you can write a description for the tag with the given name.
check_tags_tag
Specify combination of tags that must be set.
.. code-block:: xml
...
* The combination is set using boolean algebra.
* For the logical operation 'conjunction', i.e. 'and', the sign ``+`` is used. Example: ``tag1 + tag2`` means that both tags must be set.
* For the logical operation 'disjunction', i.e. 'or', the character ``|`` is used. Example: ``tag1 | tag2`` means that one of the two or both tags must be set.
* For the logical operation 'exclusive disjunction', i.e. 'xor', the character ``^`` is used. Example: ``tag1 ^ tag2`` means that one of the two (not both!) tags must be set.
* In addition, the character ``!`` can be used for the logical operation 'negation', i.e. 'not'. Example: ``!tag1`` means that the tag ``tag1`` must not be set.
selection_tag
Specify tags or select benchmarks by name.
.. code-block:: xml
.........
...
* multiple are allowed to specify tags (see tagging)
* select or unselect a benchmark by name
* only selected benchmarks will run (when using the ``run`` command)
* multiple ```` and ```` are allowed
* ```` and ```` can contain a name list divided by ``,``
patternset_tag
A patternset is a container to store a bundle of patterns.
.. code-block:: xml
...
...
* patternset-name must be unique
* ``init_with`` is optional
* if the given filepath can be found inside of the ``JUBE_INCLUDE_PATH`` and if it contains a patternset
using the given name, all pattern will be copied to the local set
* local pattern will overwrite imported pattern
* the name of the external set can differ to the local one by using ``init-with="filename.xml:external_name"``
* patternsets can be used inside the analyser tag
* different sets, which are used inside the same analyser, must be compatible
pattern_tag
A pattern is used to parse your output files and create your result data.
.. code-block:: xml
...
* ``unit`` is optional, will be used in the result table
* ``mode`` is optional, allowed modes:
* ``pattern``: a regular expression (default)
* ``text``: simple text and variable concatenation
* ``perl``: snippet evaluation (using *Perl*)
* ``python``: snippet evaluation (using *Python*)
* ``shell``: snippet evaluation (using *Shell*)
* ``type`` is optional, specify datatype (for sort operation)
* default: ``string``
* allowed: ``int``, ``float`` or ``string``
* ``default`` is optional: Specify default value if pattern cannot be found or if it cannot be evaluated
* ``dotall`` is optional (default: ``false``): Can be set to ``true`` or ``false`` to specify if a ``.`` within the regular expression
should also match newline characters, which can be very helpfull to extract a line only after a specific header was mentioned.
statistical_values
If there are multiple pattern matches within one file, multiple files or
when using multiple iterations. *JUBE* will create some statistical values
automatically:
* ``first``: first match (default)
* ``last``: last match
* ``min``: min value
* ``max``: max value
* ``avg``: average value
* ``std``: standard deviation
* ``sum``: sum
* ``cnt``: counter
These variabels can be accessed within the the result creation or to create derived pattern
by ``variable_name_`` e.g. ``${nodes_min}``
The variable name itself always matches the first match.
parameterset_tag
A parameterset is a container to store a bundle of :term:`parameters `.
.. code-block:: xml
...
...
* parameterset-name must be unique (cannot be reused inside substitutionsets or filesets)
* ``init_with`` is optional
* if the given filepath can be found inside of the ``JUBE_INCLUDE_PATH`` and if it contains a parameterset
using the given name, all parameters will be copied to the local set
* local parameters will overwrite imported parameters
* the name of the external set can differ to the local one by using ``init-with="filename.xml:external_name"``
* parametersets can be used inside the step-command
* parametersets can be combined inside the step-tag, but they must be compatible:
* Two parametersets are compatible if the parameter intersection (given by the parameter-name), only contains
parameter based on the same definition
* These two sets are compatible:
.. code-block:: xml
1,2,4foo1,2,4bar
* These two sets are not compatible:
.. code-block:: xml
1,2,4foo2bar
* ``duplicate`` is optional and of relevance, if there are more than one parameter definitions with the same name within one parameterset. This ``duplicate`` option has lower priority than the ``duplicte`` option of the parameters. ``duplicate`` must contain one of the following three options:
* ``replace`` (default): Parameters with the same name are overwritten
* ``concat``: Parameters with the same name are concatenated
* ``error``: Throws an error, if parameters with the same name are defined
parameter_tag
A parameter can be used to store benchmark configuration data. A set of different parameters will create
a specific parameter environment (also called :term:`parameter space `) for the different steps of the benchmark.
.. code-block:: xml
...
* a parameter can be seen as variable: Name is the name to use the variable, and the text between the tags
will be the real content
* name must be unique inside the given parameterset
* ``type`` is optional (only used for sorting, default: ``string``)
* ``mode`` is optional (used for script-types, default: ``text``)
* ``separator`` is optional, default: ``,``
* ``export`` is optional, if set to ``true`` the parameter will be exported to the shell environment when using ````
* ``unit`` is optional, will be used in the result table
* if the text contains the given (or the implicit) separator, a template will be created
* use of another parameter:
* inside the parameter definition, a parameter can be reused: ``... $nameofparameter ...``
* the parameter will be replaced multiple times (to handle complex parameter structures; max: 5 times)
* the substitution will be run before the execution step starts with the current :term:`parameter space `. Only parameters reachable
in this step will be usable for substitution!
* Scripting modes allowed:
* ``mode="python"``: allow *Python* snippets (using ``eval ``)
* ``mode="perl"``: allow *Perl* snippets (using ``perl -e "print "``)
* ``mode="shell"``: allow *Shell* snippets
* ``mode="env"``: include the content of an available environment variable
* ``mode="tag"``: include the tag name if the tag was set during execution, otherwise the content is empty
* Templates can be created, using scripting e.g.: ``",".join([str(2**i) for i in range(3)])``
* ``update_mode`` is optional (default: ``never``)
* can be set to ``never``, ``use``, ``step``, ``cycle`` and ``always``
* depending on the setting the parameter will be reevaluated:
* ``never``: no reevaluation, even if the parameterset is used multiple times
* ``use``: reevaluation if the parameterset is explicitly used
* ``step``: reevaluation in each new step
* ``cycle``: reevaluation in each cycle, but not at the begin of a new step (number of workpackages will stay unchanged)
* ``always``: reevaluation in each step and cycle
* ``duplicate`` is optional and of relevance, if there are more than one parameter definitions with the same name within one parameterset. This ``duplicate`` option has higher priority than the ``duplicte`` option of the parameterset. ``duplicate`` must contain one of the following four options:
* ``none`` (default): The ``duplicate`` option of the parameterset is prioritized
* ``replace``: Parameters with the same name are overwritten
* ``concat``: Parameters with the same name are concatenated
* ``error``: Throws an error, if parameters with the same name are defined
update_mode
The update mode is parameter attribute which can be used to control the reevaluation of the parameter content.
These update modes are available:
* ``never``: no reevaluation, even if the parameterset is used multiple times
* ``use``: reevaluation if the parameterset is explicitly used
* ``step``: reevaluation in each new step
* ``cycle``: reevaluation in each cycle, but not at the begin of a new step (number of workpackages will stay unchanged)
* ``always``: reevaluation in each step and cycle
fileset_tag
A fileset is a container to store a bundle of links and copy commands.
.. code-block:: xml
...
......
...
* init_with is optional
* if the given filepath can be found inside of the ``JUBE_INCLUDE_PATH`` and if it contains a fileset using the
given name, all link and copy will be copied to the local set
* the name of the external set can differ to the local one by using ``init-with="filename.xml:external_name"``
* link and copy can be mixed within one fileset (or left)
* filesets can be used inside the step-command
link_tag
A link can be used to create a symbolic link from your sandbox work directory to a file or directory inside your normal filesystem.
.. code-block:: xml
...
* ``source_dir`` is optional, will be used as a prefix for the source filenames
* ``target_dir`` is optional, will be used as a prefix for the target filenames
* ``name`` is optional, it can be used to rename the file inside your work directory (will be ignored if you use shell extensions in your pathname)
* ``rel_path_ref`` is optional
* ``external`` or ``internal`` can be chosen, default: external
* ``external``: rel.-paths based on position of xml-file
* ``internal``: rel.-paths based on current work directory (e.g. to link files of another step)
* ``active`` is optional
* can be set to ``true`` or ``false`` or any *Python* parsable bool expression to enable or disable the single command
* :term:`parameter ` are allowed inside this attribute
* each link-tag can contain a list of filenames (or directories), separated by ``,``, the default separator can be changed
by using the ``separator`` attribute
* if ``name`` is present, the lists must have the same length
* in the execution step the given files or directories will be linked
copy_tag
A copy can be used to copy a file or directory from your normal filesytem to your sandbox work directory.
.. code-block:: xml
...
* ``source_dir`` is optional, will be used as a prefix for the source filenames
* ``target_dir`` is optional, will be used as a prefix for the target filenames
* ``name`` is optional, it can be used to rename the file inside your work directory (will be ignored if you use shell extensions in your pathname)
* ``rel_path_ref`` is optional
* ``external`` or ``internal`` can be chosen, default: external
* ``external``: rel.-paths based on position of xml-file
* ``internal``: rel.-paths based on current work directory (e.g. to link files of another step)
* ``active`` is optional
* can be set to ``true`` or ``false`` or any *Python* parsable bool expression to enable or disable the single command
* :term:`parameter ` are allowed inside this attribute
* each copy-tag can contain a list of filenames (or directories), separated by ``,``, the default separator can be changed
by using the ``separator`` attribute
* if ``name`` is present, the lists must have the same length
* you can copy all files inside a directory by using ``directory/*``
* this cannot be mixed using ``name``
* in the execution step the given files or directories will be copied
prepare_tag
The prepare can contain any *Shell* command you want. It will be executed like a normal :term:`` inside the
step where the corresponding fileset is used. The only difference towards the normal do is, that it will be executed
**before** the substitution will be executed.
.. code-block:: xml
...
* ``stdout``- and ``stderr``-filename are optional (default: ``stdout`` and ``stderr``)
* ``work_dir`` is optional, it can be used to change the work directory of this single command (relativly seen towards
the original work directory)
* ``active`` is optional
* can be set to ``true`` or ``false`` or any *Python* parsable bool expression to enable or disable the single command
* :term:`parameter ` are allowed inside this attribute
substituteset_tag
A substituteset is a container to store a bundle of :term:`sub ` commands.
.. code-block:: xml
...
...
* ``init_with`` is optional
* if the given filepath can be found inside of the ``JUBE_INCLUDE_PATH`` and if it contains a substituteset using the given name, all iofile and sub will be copied to the local set
* local ``iofile`` will overwrite imported ones based on ``out``, local ``sub`` will overwrite imported ones based on ``source``
* the name of the external set can differ to the local one by using ``init-with="filename.xml:external_name"``
* substitutesets can be used inside the step-command
iofile_tag
A iofile declare the name (and path) of a file used for substitution.
.. code-block:: xml
* ``in`` and ``out`` filepath are relative to the current work directory for every single step (not relative to the path of the inputfile)
* ``in`` and ``out`` can be the same
* ``out_mode`` is optional, can be ``w`` or ``a`` (default: ``w``)
* ``w`` : ``out``-file will be overridden
* ``a`` : ``out``-file will be appended
sub_tag
A substition expression.
.. code-block:: xml
* ``source``-string will be replaced by ``dest``-string
* both can contain parameter: ``... $nameofparameter ...``
* ``mode`` is optional (default: ``text``). Can be used to switch between ``text`` and ``regex`` substitution
step_tag
A step give a list of *Shell* operations and a corresponding parameter environment.
.. code-block:: xml
...
...
* parametersets, filesets and substitutionsets are usable
* using sets ```` is the same as ````
* parameter can be used inside the ``