taucmdr.model.compiler module

Compiler data model.

TAU only works reliablly when the same compiler is used to build both the application source code and TAU itself. If the system compiler changes TAU can break entirely. This data tracks the system compilers so we can warn the user if they have changed.

class taucmdr.model.compiler.Compiler(record)[source]

Bases: taucmdr.mvc.model.Model

Compiler data model.

associations = {}
attributes = {'compiler_flags': {'description': 'extra flags to use when compiling with this compiler', 'required': False, 'type': 'array'}, 'family': {'description': "compiler's family name", 'required': True, 'type': 'string'}, 'include_path': {'description': 'extra paths to search for include files when compiling with this compiler', 'required': False, 'type': 'array'}, 'libraries': {'description': 'extra libraries to link when compiling with this compiler', 'required': False, 'type': 'array'}, 'library_path': {'description': 'extra paths to search for libraries when compiling with this compiler', 'required': False, 'type': 'array'}, 'path': {'description': 'absolute path to the compiler command', 'required': True, 'type': 'string'}, 'role': {'description': 'role this command plays in the compiler family, e.g. CXX or MPI_CC', 'required': True, 'type': 'string'}, 'uid': {'description': 'compiler unique identifier', 'required': True, 'type': 'string'}, 'wrapped': {'description': 'compiler wrapped by this compiler', 'model': <class 'taucmdr.model.compiler.Compiler'>, 'required': False}}
installation()[source]

Gets information about this compiler installation.

Returns:Information about the installed compiler command.
Return type:InstalledCompiler
key_attribute
name = 'Compiler'
references = {(<class 'taucmdr.model.target.Target'>, 'MPI_CXX'), (<class 'taucmdr.model.target.Target'>, 'SHMEM_CXX'), (<class 'taucmdr.model.target.Target'>, 'Host_UPC'), (<class 'taucmdr.model.target.Target'>, 'Host_FC'), (<class 'taucmdr.model.target.Target'>, 'CAF_FC'), (<class 'taucmdr.model.target.Target'>, 'Host_CC'), (<class 'taucmdr.model.target.Target'>, 'SHMEM_FC'), (<class 'taucmdr.model.target.Target'>, 'CUDA_CXX'), (<class 'taucmdr.model.target.Target'>, 'SHMEM_CC'), (<class 'taucmdr.model.target.Target'>, 'python_PY'), (<class 'taucmdr.model.compiler.Compiler'>, 'wrapped'), (<class 'taucmdr.model.target.Target'>, 'Host_CXX'), (<class 'taucmdr.model.target.Target'>, 'MPI_CC'), (<class 'taucmdr.model.target.Target'>, 'CUDA_FC'), (<class 'taucmdr.model.target.Target'>, 'MPI_FC')}
verify()[source]

Checks that the system state matches the recorded compiler information.

May execute the compiler or other commands, check filesystem paths, and check environment variables to determine if this compiler record is still valid. This operation may be expensive.

Returns:Information on the compiler installation matching this record.
Return type:InstalledCompiler
Raises:ConfigurationError – This compiler record is no longer valid.
class taucmdr.model.compiler.CompilerController(model_cls, storage, context=None)[source]

Bases: taucmdr.mvc.controller.Controller

Compiler data controller.

register(comp)[source]

Records information about an installed compiler command in the database.

If the compiler has already been registered then do not update the database.

Parameters:comp (InstalledCompiler) – Information about an installed compiler.
Returns:Data controller for the installed compiler’s data.
Return type:Compiler
taucmdr.model.compiler.attributes()[source]