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

Gets information about this compiler installation.

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