taucmdr.model.application module¶
Application data model.
Application
fully describes the application configuration to be profiled,
including the features the application uses, e.g. OpenMP, MPI, CUDA, etc.
Each specific application configuration has its own application record.
For example, if an application can operate with or without OpenMP then there
are potentially two application records for the same application code: one
specifying OpenMP is used and the other specifying OpenMP is not used.
-
class
taucmdr.model.application.
Application
(record)[source]¶ Bases:
taucmdr.mvc.model.Model
Application data model.
-
associations
= {'projects': (<class 'taucmdr.model.project.Project'>, 'applications')}¶
-
attributes
= {'caf': {'argparse': {'flags': ('--caf',)}, 'compat': {True: (<function attributes.<locals>._encourage_except_baseline>, <function Model.construct_condition.<locals>.condition>)}, 'default': False, 'description': 'application uses Coarray Fortran', 'rebuild_required': True, 'type': 'boolean'}, 'cuda': {'argparse': {'flags': ('--cuda',)}, 'compat': {True: <function Model.construct_condition.<locals>.condition>}, 'default': False, 'description': 'application uses NVIDIA CUDA', 'rebuild_required': True, 'type': 'boolean'}, 'linkage': {'argparse': {'choices': ('static', 'dynamic'), 'flags': ('--linkage',), 'metavar': '<linkage>'}, 'compat': {'static': <function Model.construct_condition.<locals>.condition>}, 'default': 'dynamic', 'description': 'application linkage', 'rebuild_required': True, 'type': 'string'}, 'max_threads': {'argparse': {'const': 25, 'flags': ('--max-threads',), 'metavar': 'threads', 'nargs': '?'}, 'description': 'maximum number of threads', 'rebuild_required': True, 'type': 'integer'}, 'mpc': {'argparse': {'flags': ('--mpc',)}, 'default': False, 'description': 'application uses MPC', 'rebuild_required': True, 'type': 'boolean'}, 'mpi': {'argparse': {'flags': ('--mpi',)}, 'compat': {True: <function attributes.<locals>._encourage_except_baseline>}, 'default': False, 'description': 'application uses MPI', 'rebuild_required': True, 'type': 'boolean'}, 'name': {'description': 'application configuration name', 'primary_key': True, 'type': 'string', 'unique': True}, 'openacc': {'argparse': {'flags': ('--openacc',)}, 'default': False, 'description': 'application uses OpenACC', 'rebuild_required': True, 'type': 'boolean'}, 'opencl': {'argparse': {'flags': ('--opencl',)}, 'compat': {True: (<function Model.construct_condition.<locals>.condition>, <function attributes.<locals>._encourage_except_baseline>)}, 'default': False, 'description': 'application uses OpenCL', 'rebuild_required': True, 'type': 'boolean'}, 'openmp': {'argparse': {'flags': ('--openmp',)}, 'default': False, 'description': 'application uses OpenMP', 'rebuild_required': True, 'type': 'boolean'}, 'projects': {'collection': <class 'taucmdr.model.project.Project'>, 'description': 'projects using this application', 'via': 'applications'}, 'pthreads': {'argparse': {'flags': ('--pthreads',)}, 'default': False, 'description': 'application uses pthreads', 'rebuild_required': True, 'type': 'boolean'}, 'python': {'argparse': {'flags': ('--python',)}, 'default': False, 'description': 'application uses Python', 'rebuild_required': True, 'type': 'boolean'}, 'shmem': {'argparse': {'flags': ('--shmem',)}, 'default': False, 'description': 'application uses SHMEM', 'rebuild_required': True, 'type': 'boolean'}, 'tbb': {'argparse': {'flags': ('--tbb',)}, 'default': False, 'description': 'application uses Thread Building Blocks (TBB)', 'rebuild_required': True, 'type': 'boolean'}}¶
-
check_compiler
(compilers)[source]¶ Checks a list of compilers for compatibility with this application configuration.
Parameters: compilers (list) – Compiler
instances that could possibly be compatible with this application.Returns: A compiler from compilers that can be used to build the application. Return type: Compiler Raises: ConfigurationError
– No compiler in compilers is compatible with this application.
-
is_selected
()[source]¶ Returns True if this target configuration is part of the selected experiment, False otherwise.
-
key_attribute
= 'name'¶
-
name
= 'Application'¶
-
references
= {(<class 'taucmdr.model.experiment.Experiment'>, 'application')}¶
-
-
class
taucmdr.model.application.
ApplicationController
(model_cls, storage, context=None)[source]¶ Bases:
taucmdr.mvc.controller.Controller
Application 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.
-