taucmdr.model.target module¶
Target data model.
Target
fully describes the hardware and software environment that our
experiments will be performed in. The hardware architecture, available compilers,
and system libraries are described in the target record. There will be multiple
target records for any physical computer system since each target record uniquely
describes a specific set of system features. For example, if both GNU and Intel
compilers are installed then there will target configurations for each compiler family.
-
class
taucmdr.model.target.
Target
(*args, **kwargs)[source]¶ Bases:
taucmdr.mvc.model.Model
Target data model.
-
associations
= {'projects': (<class 'taucmdr.model.project.Project'>, 'targets')}¶
-
attributes
= {'CAF_FC': {'argparse': {'flags': ('--caf-fc',), 'group': 'CAF', 'metavar': '<command>'}, 'description': 'Coarray Fortran compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'CUDA_CXX': {'argparse': {'flags': ('--cuda-cxx',), 'group': 'CUDA', 'metavar': '<command>'}, 'description': 'CUDA compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'CUDA_FC': {'argparse': {'flags': ('--cuda-fc',), 'group': 'CUDA', 'metavar': '<command>'}, 'description': 'CUDA Fortran compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'Host_CC': {'argparse': {'flags': ('--cc',), 'group': 'host', 'metavar': '<command>'}, 'description': 'Host C compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': True}, 'Host_CXX': {'argparse': {'flags': ('--cxx',), 'group': 'host', 'metavar': '<command>'}, 'description': 'Host C++ compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': True}, 'Host_FC': {'argparse': {'flags': ('--fc',), 'group': 'host', 'metavar': '<command>'}, 'description': 'Host Fortran compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'Host_UPC': {'argparse': {'flags': ('--upc',), 'group': 'Universal Parallel C', 'metavar': '<command>'}, 'description': 'Universal Parallel C compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'MPI_CC': {'argparse': {'flags': ('--mpi-cc',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'description': 'MPI C compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'MPI_CXX': {'argparse': {'flags': ('--mpi-cxx',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'description': 'MPI C++ compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'MPI_FC': {'argparse': {'flags': ('--mpi-fc',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'description': 'MPI Fortran compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'SHMEM_CC': {'argparse': {'flags': ('--shmem-cc',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'description': 'SHMEM C compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'SHMEM_CXX': {'argparse': {'flags': ('--shmem-cxx',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'description': 'SHMEM C++ compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'SHMEM_FC': {'argparse': {'flags': ('--shmem-fc',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'description': 'SHMEM Fortran compiler command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'binutils_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--binutils',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'path or URL to a GNU binutils installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'cuda_toolkit': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--cuda-toolkit',), 'group': 'CUDA', 'metavar': '<path>'}, 'default': None, 'description': 'path to NVIDIA CUDA Toolkit (enables OpenCL support)', 'rebuild_required': True, 'type': 'string'}, 'forced_makefile': {'argparse': {'flags': ('--from-tau-makefile',), 'metavar': '<path>'}, 'description': 'Populate target configuration from a TAU Makefile (WARNING: Overrides safety checks)', 'rebuild_required': True, 'type': 'string'}, 'gotcha_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--gotcha',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'GOTCHA installation for Score-P use', 'rebuild_required': True, 'type': 'string'}, 'host_arch': {'argparse': {'choices': ['x86_64', 'KNC', 'KNL', 'BGL', 'BGP', 'BGQ', 'ibm64', 'ppc64', 'ppc64le', 'aarch32', 'aarch64'], 'flags': ('--arch',), 'group': 'host', 'metavar': '<arch>'}, 'compat': {'KNC': (<function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>)}, 'default': 'x86_64', 'description': 'host architecture', 'rebuild_required': True, 'required': True, 'type': 'string'}, 'host_os': {'argparse': {'choices': ['Darwin', 'Linux', 'CNK', 'CNL', 'Android'], 'flags': ('--os',), 'group': 'host', 'metavar': '<os>'}, 'default': 'Linux', 'description': 'host operating system', 'rebuild_required': True, 'required': True, 'type': 'string'}, 'level_zero_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--level_zero_source',), 'group': 'software package', 'metavar': '(<path>|None)'}, 'default': None, 'description': 'path to Intel Level Zero', 'rebuild_required': True, 'type': 'string'}, 'libdwarf_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--libdwarf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: (<function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>)}, 'default': 'download', 'description': 'path or URL to a libdwarf installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'libelf_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--libelf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'libelf installation for libdwarf use', 'rebuild_required': True, 'type': 'string'}, 'libotf2_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--otf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'default': 'download', 'description': 'path or URL to libotf2 installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'libunwind_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--libunwind',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'path or URL to a libunwind installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'mpi_libraries': {'argparse': {'flags': ('--mpi-libraries',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<flag>'}, 'compat': {<class 'bool'>: (<function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>)}, 'description': 'libraries to link to when building MPI applications', 'rebuild_required': True, 'type': 'array'}, 'name': {'description': 'target configuration name', 'primary_key': True, 'type': 'string', 'unique': True}, 'ompt_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--ompt',), 'group': 'software package', 'metavar': '(<path>|<url>|download|download-tr4|download-tr6|None)'}, 'default': 'download', 'description': 'path or URL to OMPT installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'papi_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--papi',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'path or URL to a PAPI installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'pdt_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--pdt',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'default': 'download', 'description': 'path or URL to a PDT installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'projects': {'collection': <class 'taucmdr.model.project.Project'>, 'description': 'projects using this target', 'via': 'targets'}, 'python_PY': {'argparse': {'flags': ('--python-interpreter',), 'group': 'python', 'metavar': '<command>'}, 'description': 'Python Interpreter command', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'rebuild_required': True, 'required': False}, 'scorep_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--scorep',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'compat': {<function attributes.<locals>.<lambda>>: (<function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>)}, 'default': 'download', 'description': 'path or URL to a Score-P installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'shmem_libraries': {'argparse': {'flags': ('--shmem-libraries',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<flag>'}, 'description': 'libraries to link to when building SHMEM applications', 'rebuild_required': True, 'type': 'array'}, 'sqlite3_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--sqlite3',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)'}, 'default': 'download', 'description': 'path or URL to SQLite3 installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'tau_source': {'argparse': {'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>, 'flags': ('--tau',), 'group': 'software package', 'metavar': '(<path>|<url>|download|nightly)'}, 'compat': {True: <function Model.construct_condition.<locals>.condition>}, 'default': 'download', 'description': 'path or URL to a TAU installation or archive file', 'rebuild_required': True, 'type': 'string'}, 'unwinder': {'argparse': {'flags': ('--unwinder',), 'group': 'software package', 'metavar': '(libunwind|backtrace|None)'}, 'compat': {'backtrace': (<function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>, <function Model.construct_condition.<locals>.condition>), 'libunwind': <function Model.construct_condition.<locals>.condition>}, 'default': 'libunwind', 'description': 'name of unwinder to be used', 'rebuild_required': True, 'type': 'string'}}¶
-
check_compiler
(compiler_cmd, compiler_args)[source]¶ Checks a compiler command its arguments for compatibility with this target configuration.
Checks that the given compiler matches at least one, but possibly more, of the compilers used in the target. Also performs any special checks for invalid compiler arguments, e.g. -mmic is only for native KNC.
If the given compiler command and arguments are compatible with this target then information about matching compiler installations is returned as a list of n
InstalledCompiler
instances.Parameters: Returns: Information about matching installed compilers as
Compiler
instances.Return type: Raises: ConfigurationError
– The compiler or command line arguments are incompatible with this target.
-
compilers
()[source]¶ Get information about the compilers used by this target configuration.
Returns: Collection of installed compilers used by this target. Return type: InstalledCompilerSet
-
is_selected
()[source]¶ Returns True if this target configuration is part of the selected experiment, False otherwise.
-
key_attribute
= 'name'¶
-
name
= 'Target'¶
-
references
= {(<class 'taucmdr.model.experiment.Experiment'>, 'target')}¶
-
-
class
taucmdr.model.target.
TargetController
(model_cls, storage, context=None)[source]¶ Bases:
taucmdr.mvc.controller.Controller
Target data controller.
-
delete
(keys, context=True)[source]¶ Delete recorded data and update associations.
- The behavior depends on the type of keys:
- Record.ElementIdentifier: delete the record with that element identifier.
- dict: delete all records with attributes matching keys.
- list or tuple: delete all records matching the elements of keys.
bool(keys) == False
: raise ValueError.
Invokes the on_delete callback after the data is deleted. If this callback raises an exception then the operation is reverted.
Parameters: - keys (dict) – Attributes to match.
- keys – Fields or element identifiers to match.
-
-
taucmdr.model.target.
_require_compiler_family
(family, *hints)[source]¶ Creates a compatibility callback to check a compiler family.
Parameters: - family – The required compiler family.
- *hints – String hints to show the user when the check fails.
Returns: a compatibility checking callback for use with data models.
Return type: callable
-
taucmdr.model.target.
attributes
()[source]¶ Construct attributes dictionary for the target model.
We build the attributes in a function so that classes like
taucmdr.module.project.Project
are fully initialized and usable in the returned dictionary.Returns: Attributes dictionary. Return type: dict
-
taucmdr.model.target.
knc_require_k1om
(*_)[source]¶ Compatibility checking callback for use with data models.
Requires that the Intel k1om tools be installed if the host architecture is KNC.
Raises: ConfigurationError
– Invalid compiler family specified in target configuration.
-
taucmdr.model.target.
tau_source_default
()[source]¶ “Per Sameer’s request, override managed TAU installation with an existing unmanaged TAU installation.
If a file named “override_tau_source” exists in the system-level storage prefix, use the contents of that file as the default path for TAU. Otherwise use “download” as the default.
Returns: Path to TAU or “download”. Return type: str