taucmdr.cf.software.tests.test_tau_configure module¶
Test functions.
Functions used for unit tests of how tau_installation.py configures, selects, and runs TAU. Nothing is built: subprocesses, installation prefixes, and makefile lookups are mocked.
- class taucmdr.cf.software.tests.test_tau_configure.ApplicationCommandTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
TauInstallation.get_application_commandwithout a TAU installation.- _LAUNCHER = ['mpirun', '-np', '4']¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_appfile_launch_rewrites_appfile()[source]¶
With no application command the launcher’s application file is rewritten instead.
- test_baseline_uses_tau_baseline()[source]¶
Baseline measurements run everything under tau_baseline without touching the makefile.
- test_instrumented_binary_runs_directly()[source]¶
Source instrumentation, static linkage, or no measurement at all: tau_exec is not needed.
- test_managed_makefile_without_uid_is_silent()[source]¶
The compatibility warning is reserved for unmanaged installations.
- test_mpmd_command_without_executable_rejected()[source]¶
An MPMD command that names no executable cannot be wrapped.
- test_mpmd_wraps_each_executable()[source]¶
Every MPMD command gets its own tau_exec; launcher flags between commands are untouched.
- test_python_uses_tau_python()[source]¶
Python applications run under tau_python with the target interpreter and the python tag stripped.
- class taucmdr.cf.software.tests.test_tau_configure.CompiletimeConfigTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the TAU_OPTIONS and compiler options from
TauInstallation.compiletime_config.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_fallback_instrumentation()[source]¶
Fallback compiler instrumentation reverts to the plain compiler when TAU’s wrapper fails.
- test_forced_options_replace_defaults()[source]¶
Forced TAU options are used verbatim instead of the derived set.
- test_full_instrumentation()[source]¶
Source plus compiler instrumentation turns on every matching TAU compiler option.
- test_manual_source_instrumentation()[source]¶
Manual source instrumentation links only but still defines TAU_ENABLED for the user’s macros.
- class taucmdr.cf.software.tests.test_tau_configure.ConfigureTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the flags
TauInstallation.configuregives TAU’s configure script.- _classSetupFailed = False¶
- _class_cleanups = []¶
- static _ompt_tau(compilers=None)[source]¶
An OMPT configuration whose OMPT runtime is installed at /fake/ompt.
- test_default_flags()[source]¶
A serial, single-threaded configuration passes tag, arch, compilers, and the default useropts.
- test_failure_raises()[source]¶
A nonzero exit from TAU’s configure script is a package error for full and minimal builds.
- test_invalid_openmp_measurement()[source]¶
An unknown OpenMP measurement method is caught before configure runs.
- test_level_zero_dependency_prefix()[source]¶
A managed Level Zero runtime is passed by prefix instead of the bare -level_zero flag.
- test_ompt_flags()[source]¶
OMPT points TAU at the OMPT runtime and adds its include path for omp-tools.h.
- test_ompt_for_intel_19()[source]¶
Intel 19 and later ship their own OMPT runtime, so TAU is configured with a bare -ompt.
- test_ompt_prefix_for_older_intel()[source]¶
Intel before 19, or an unknown version, still needs the downloaded OMPT runtime.
- test_ompt_without_dependency()[source]¶
OMPT without a managed OMPT runtime enables OpenMP but passes no OMPT flags.
- class taucmdr.cf.software.tests.test_tau_configure.DataFormatTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for guessing performance data formats from file names.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_extensions()[source]¶
Known extensions map to their formats, including gzipped merged profiles.
- class taucmdr.cf.software.tests.test_tau_configure.EnvironmentTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for environment sanitizing and environment compatibility checks.
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_check_env_compat_accepts_clean_environment()[source]¶
No darshan and a non-Cray programming environment pass.
- test_check_env_compat_rejects_darshan()[source]¶
Darshan preloaded or loaded as a module is incompatible with TAU.
- class taucmdr.cf.software.tests.test_tau_configure.GetMakefileTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
TauInstallation.get_makefile.- _LIB_PATH = '/tau/lib'¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_forced_arch_directory()[source]¶
A forced makefile’s bin and lib are beside it, whatever its architecture directory is named.
- class taucmdr.cf.software.tests.test_tau_configure.RuntimeConfigTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for the tau_exec options and environment from
TauInstallation.runtime_config.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_cuda_without_cupti()[source]¶
CUDA measurement without CUPTI headers cannot ask tau_exec for -cupti.
- test_defaults_are_minimal()[source]¶
With no features enabled tau_exec gets no options and TAU sees only the wall clock.
- test_openmp()[source]¶
OMPT measurement adds -ompt and the OMPT environment; ignoring OpenMP adds neither.
- test_profile_formats()[source]¶
Each profile format sets exactly the TAU and Score-P variables it needs.
- test_throttle_and_callpath()[source]¶
Throttle limits and callpath depth are exported only when enabled.
- class taucmdr.cf.software.tests.test_tau_configure.TagsTest(methodName='runTest')[source]¶
Bases:
TestCaseTests for
TauInstallation.get_tagsand the tags a configuration must not approximate.- _classSetupFailed = False¶
- _class_cleanups = []¶
- test_dependencies()[source]¶
PDT, PAPI, and Score-P are tagged only when the configuration uses them.
- test_incompatible_tags_with_features()[source]¶
Features the configuration uses are never incompatible.
- test_incompatible_tags_without_features()[source]¶
Makefiles for features the configuration lacks must never be approximated.
- test_invalid_openmp_measurement()[source]¶
An unknown OpenMP measurement method is an internal error.
- class taucmdr.cf.software.tests.test_tau_configure._FakeCompiler(command, family, version=None)[source]¶
Bases:
objectJust enough of InstalledCompiler for configure() to build its flag list.
- taucmdr.cf.software.tests.test_tau_configure._base_config(opts=None, env=None)[source]¶
Stand-in for Installation’s compile-time and runtime configuration, which needs an install prefix.