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.

acquire_sources()[source]

Acquire all source code packages known to this target.

architecture()[source]
associations = {'projects': (<class 'taucmdr.model.project.Project'>, 'targets')}
attributes = {'projects': {'collection': <class 'taucmdr.model.project.Project'>, 'via': 'targets', 'description': 'projects using this target'}, 'name': {'primary_key': True, 'type': 'string', 'unique': True, 'description': 'target configuration name'}, 'host_os': {'type': 'string', 'required': True, 'description': 'host operating system', 'default': 'Linux', 'argparse': {'flags': ('--os',), 'group': 'host', 'metavar': '<os>', 'choices': ['Darwin', 'Linux', 'CNK', 'CNL', 'Android']}, 'rebuild_required': True}, 'host_arch': {'type': 'string', 'required': True, 'description': 'host architecture', 'default': 'x86_64', 'argparse': {'flags': ('--arch',), 'group': 'host', 'metavar': '<arch>', 'choices': ['x86_64', 'KNC', 'KNL', 'BGL', 'BGP', 'BGQ', 'ibm64', 'ppc64', 'ppc64le', 'aarch32', 'aarch64']}, 'compat': {'KNC': (<function Model.construct_condition.<locals>.condition at 0x7f2b766709e0>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670a70>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670b00>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670b90>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670c20>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670cb0>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670d40>)}, 'rebuild_required': True}, 'Host_CC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': True, 'description': 'Host C compiler command', 'argparse': {'flags': ('--cc',), 'group': 'host', 'metavar': '<command>'}, 'rebuild_required': True}, 'Host_CXX': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': True, 'description': 'Host C++ compiler command', 'argparse': {'flags': ('--cxx',), 'group': 'host', 'metavar': '<command>'}, 'rebuild_required': True}, 'Host_FC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'Host Fortran compiler command', 'argparse': {'flags': ('--fc',), 'group': 'host', 'metavar': '<command>'}, 'rebuild_required': True}, 'Host_UPC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'Universal Parallel C compiler command', 'argparse': {'flags': ('--upc',), 'group': 'Universal Parallel C', 'metavar': '<command>'}, 'rebuild_required': True}, 'MPI_CC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'MPI C compiler command', 'argparse': {'flags': ('--mpi-cc',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'rebuild_required': True}, 'MPI_CXX': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'MPI C++ compiler command', 'argparse': {'flags': ('--mpi-cxx',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'rebuild_required': True}, 'MPI_FC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'MPI Fortran compiler command', 'argparse': {'flags': ('--mpi-fc',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<command>'}, 'rebuild_required': True}, 'mpi_libraries': {'type': 'array', 'description': 'libraries to link to when building MPI applications', 'argparse': {'flags': ('--mpi-libraries',), 'group': 'Message Passing Interface (MPI)', 'metavar': '<flag>'}, 'compat': {<class 'bool'>: (<function Model.construct_condition.<locals>.condition at 0x7f2b76670dd0>, <function Model.construct_condition.<locals>.condition at 0x7f2b76670ef0>, <function Model.construct_condition.<locals>.condition at 0x7f2b766a7050>)}, 'rebuild_required': True}, 'SHMEM_CC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'SHMEM C compiler command', 'argparse': {'flags': ('--shmem-cc',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'rebuild_required': True}, 'SHMEM_CXX': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'SHMEM C++ compiler command', 'argparse': {'flags': ('--shmem-cxx',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'rebuild_required': True}, 'SHMEM_FC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'SHMEM Fortran compiler command', 'argparse': {'flags': ('--shmem-fc',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<command>'}, 'rebuild_required': True}, 'shmem_libraries': {'type': 'array', 'description': 'libraries to link to when building SHMEM applications', 'argparse': {'flags': ('--shmem-libraries',), 'group': 'Symmetric Hierarchical Memory (SHMEM)', 'metavar': '<flag>'}, 'rebuild_required': True}, 'CUDA_CXX': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'CUDA compiler command', 'argparse': {'flags': ('--cuda-cxx',), 'group': 'CUDA', 'metavar': '<command>'}, 'rebuild_required': True}, 'CUDA_FC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'CUDA Fortran compiler command', 'argparse': {'flags': ('--cuda-fc',), 'group': 'CUDA', 'metavar': '<command>'}, 'rebuild_required': True}, 'CAF_FC': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'Coarray Fortran compiler command', 'argparse': {'flags': ('--caf-fc',), 'group': 'CAF', 'metavar': '<command>'}, 'rebuild_required': True}, 'python_PY': {'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False, 'description': 'Python Interpreter command', 'argparse': {'flags': ('--python-interpreter',), 'group': 'python', 'metavar': '<command>'}, 'rebuild_required': True}, 'cuda_toolkit': {'type': 'string', 'description': 'path to NVIDIA CUDA Toolkit (enables OpenCL support)', 'default': None, 'argparse': {'flags': ('--cuda-toolkit',), 'group': 'CUDA', 'metavar': '<path>', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'tau_source': {'type': 'string', 'description': 'path or URL to a TAU installation or archive file', 'default': 'download', 'argparse': {'flags': ('--tau',), 'group': 'software package', 'metavar': '(<path>|<url>|download|nightly)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {True: <function Model.construct_condition.<locals>.condition at 0x7f2b766a7170>}, 'rebuild_required': True}, 'pdt_source': {'type': 'string', 'description': 'path or URL to a PDT installation or archive file', 'default': 'download', 'argparse': {'flags': ('--pdt',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'binutils_source': {'type': 'string', 'description': 'path or URL to a GNU binutils installation or archive file', 'default': 'download', 'argparse': {'flags': ('--binutils',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b766a70e0>: <function Model.construct_condition.<locals>.condition at 0x7f2b766a7320>}, 'rebuild_required': True}, 'unwinder': {'type': 'string', 'description': 'name of unwinder to be used', 'default': 'libunwind', 'argparse': {'flags': ('--unwinder',), 'group': 'software package', 'metavar': '(libunwind|backtrace|None)'}, 'compat': {'libunwind': <function Model.construct_condition.<locals>.condition at 0x7f2b766a74d0>, 'backtrace': (<function Model.construct_condition.<locals>.condition at 0x7f2b766a7680>, <function Model.construct_condition.<locals>.condition at 0x7f2b766a7710>, <function Model.construct_condition.<locals>.condition at 0x7f2b766a77a0>)}, 'rebuild_required': True}, 'libunwind_source': {'type': 'string', 'description': 'path or URL to a libunwind installation or archive file', 'default': 'download', 'argparse': {'flags': ('--libunwind',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b766a75f0>: <function Model.construct_condition.<locals>.condition at 0x7f2b766a78c0>}, 'rebuild_required': True}, 'libdwarf_source': {'type': 'string', 'description': 'path or URL to a libdwarf installation or archive file', 'default': 'download', 'argparse': {'flags': ('--libdwarf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b766a7950>: (<function Model.construct_condition.<locals>.condition at 0x7f2b766a7b00>, <function Model.construct_condition.<locals>.condition at 0x7f2b766a7cb0>)}, 'rebuild_required': True}, 'libelf_source': {'type': 'string', 'description': 'libelf installation for libdwarf use', 'default': 'download', 'argparse': {'flags': ('--libelf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b766a7c20>: <function Model.construct_condition.<locals>.condition at 0x7f2b766a7e60>}, 'rebuild_required': True}, 'papi_source': {'type': 'string', 'description': 'path or URL to a PAPI installation or archive file', 'default': 'download', 'argparse': {'flags': ('--papi',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b766a7ef0>: <function Model.construct_condition.<locals>.condition at 0x7f2b7667c0e0>}, 'rebuild_required': True}, 'scorep_source': {'type': 'string', 'description': 'path or URL to a Score-P installation or archive file', 'default': 'download', 'argparse': {'flags': ('--scorep',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'compat': {<function attributes.<locals>.<lambda> at 0x7f2b7667c170>: (<function Model.construct_condition.<locals>.condition at 0x7f2b7667c320>, <function Model.construct_condition.<locals>.condition at 0x7f2b7667c4d0>, <function Model.construct_condition.<locals>.condition at 0x7f2b7667c5f0>, <function Model.construct_condition.<locals>.condition at 0x7f2b7667c710>)}, 'rebuild_required': True}, 'ompt_source': {'type': 'string', 'description': 'path or URL to OMPT installation or archive file', 'default': 'download', 'argparse': {'flags': ('--ompt',), 'group': 'software package', 'metavar': '(<path>|<url>|download|download-tr4|download-tr6|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'libotf2_source': {'type': 'string', 'description': 'path or URL to libotf2 installation or archive file', 'default': 'download', 'argparse': {'flags': ('--otf',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'sqlite3_source': {'type': 'string', 'description': 'path or URL to SQLite3 installation or archive file', 'default': 'download', 'argparse': {'flags': ('--sqlite3',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'level_zero_source': {'type': 'string', 'description': 'path to Intel Level Zero', 'default': 'download', 'argparse': {'flags': ('--level_zero_source',), 'group': 'software package', 'metavar': '(<path>|<url>|download|None)', 'action': <class 'taucmdr.cli.arguments.ParsePackagePathAction'>}, 'rebuild_required': True}, 'forced_makefile': {'type': 'string', 'description': 'Populate target configuration from a TAU Makefile (WARNING: Overrides safety checks)', 'argparse': {'flags': ('--from-tau-makefile',), 'metavar': '<path>'}, 'rebuild_required': True}}
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:
  • compiler_cmd (str) – The compiler command as passed by the user.
  • compiler_args (list) – Compiler command line arguments.
Returns:

Information about matching installed compilers as Compiler instances.

Return type:

list

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
cupti_metrics()[source]
get_installation(name)[source]
is_selected()[source]

Returns True if this target configuration is part of the selected experiment, False otherwise.

key_attribute = 'name'
name = 'Target'
on_create()[source]
on_delete()[source]
on_update(changes)[source]
operating_system()[source]
papi_metrics(event_type='PRESET', include_modifiers=False)[source]
references = {(<class 'taucmdr.model.experiment.Experiment'>, 'target')}
sources()[source]

Get paths to all source packages known to this target.

Returns:Software package paths indexed by package name.
Return type:dict
tau_metrics()[source]
class taucmdr.model.target.TargetController(model_cls, storage, context=None)[source]

Bases: taucmdr.mvc.controller.Controller

Target data controller.

delete(keys, context=True)[source]
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.cuda_toolkit_default()[source]
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.level_zero_source_default()[source]
taucmdr.model.target.papi_source_default()[source]

Choose the best default PAPI source.

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