ParaToolsInc / taucmdr

Performance engineering for the rest of us.
http://www.taucommander.com
Other
29 stars 11 forks source link

Python 3 branch doesn't display custom error when unknown compiler used #385

Closed nchaimov closed 2 years ago

nchaimov commented 3 years ago

On unstable, a custom error message is provided if the user tries to use a compiler that TAU Commander doesn't know about.

For example, if a project is configured to use GCC host compilers but Intel compilers are used instead, an error like this is displayed:

nchaimov@delphi /home/nchaimov/taucmdr/examples/mm $ tau icc
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[TAU]
[TAU] CRITICAL
[TAU]
[TAU] No compiler in target 'delphi' matches '/packages/intel/18/linux/bin/intel64/icc'.
[TAU] The known compiler commands are:
[TAU]   /home/nchaimov/ompi-inst/bin/mpic++ (System MPI C++ compiler)
[TAU]   /home/nchaimov/ompi-inst/bin/mpicc (System MPI C compiler)
[TAU]   /packages/gcc/7.3/bin/g++ (GNU C++ compiler)
[TAU]   /home/nchaimov/ompi-inst/bin/mpif90 (System MPI Fortran compiler)
[TAU]   /home/nchaimov/ompi-inst/bin/oshcxx (OpenSHMEM SHMEM C++ compiler)
[TAU]   /home/nchaimov/ompi-inst/bin/oshcc (OpenSHMEM SHMEM C compiler)
[TAU]   /packages/gcc/7.3/bin/gcc (GNU C compiler)
[TAU]   /home/nchaimov/ompi-inst/bin/oshfort (OpenSHMEM SHMEM Fortran compiler)
[TAU]   /packages/gcc/7.3/bin/gfortran (GNU Fortran compiler)
[TAU]
[TAU] Hints:
[TAU]   * Try one of the valid compiler commands
[TAU]   * Create and select a new target configuration that uses the '/packages/intel/18/linux/bin/intel64/icc' compiler
[TAU]   * Check loaded modules and the PATH environment variable
[TAU]
[TAU] TAU cannot proceed with the given inputs.
[TAU] Please check the configuration for errors or contact <support@paratools.com> for assistance.
[TAU]
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
nchaimov@delphi /home/nchaimov/taucmdr/examples/mm $

In the sane-dependencies branch, an internal error occurs instead:

nchaimov@delphi /home/nchaimov/taucmdr-py3/examples/mm $ tau icc
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[TAU]
[TAU] CRITICAL
[TAU]
[TAU] An unexpected AttributeError exception was raised:
[TAU]
[TAU] '_CompilerRole' object has no attribute 'absolute_path'
[TAU]
[TAU] Traceback (most recent call last):
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/tau", line 69, in <module>
[TAU]     sys.exit(cli_main_cmd.main(sys.argv[1:]))
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/cli/commands/__main__.py", line 153, in main
[TAU]     return cli.execute_command(shortcut, cmd_args)
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/cli/__init__.py", line 319, in execute_command
[TAU]     return main(perm_args)
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/cli/commands/build.py", line 89, in main
[TAU]     return expr.managed_build(args.cmd, args.cmd_args)
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/model/experiment.py", line 371, in managed_build
[TAU]     target_compilers = target.check_compiler(compiler_cmd, compiler_args)
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/model/target.py", line 687, in check_compiler
[TAU]     parts.extend(f'  {comp.absolute_path} ({comp.info.short_descr})' for comp in known_compilers)
[TAU]   File "/home/nchaimov/taucmdr-py3/scripts/../packages/taucmdr/model/target.py", line 687, in <genexpr>
[TAU]     parts.extend(f'  {comp.absolute_path} ({comp.info.short_descr})' for comp in known_compilers)
[TAU] AttributeError: '_CompilerRole' object has no attribute 'absolute_path'
[TAU]
[TAU] This is a bug in TAU Commander.
[TAU] Please send '/storage/users/nchaimov/.local/taucmdr/debug_log' to <support@paratools.com> for assistance.
[TAU]
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The Python 3 branch should produce the same error message as unstable when an unknown compiler is used.