MPAS-Dev/MPAS-Analysis

Error is not intuitive when an incorrect machine is specified

Closed this issue · 2 comments

xylar commented

If someone uses a machine like cori instead of cori-haswell, the error is very obscure:

For example,

Traceback (most recent call last):
  File "/global/homes/c/cbegeman/miniconda3/envs/mpas_dev/bin/mpas_analysis", line 33, in <module>
    sys.exit(load_entry_point('mpas-analysis', 'console_scripts', 'mpas_analysis')())
  File "/global/u1/c/cbegeman/MPAS-Analysis-worktrees/add_my_developer_task_tutorial/mpas_analysis/__main__.py", line 797, in main
    config.add_from_package('mache.machines', f'{machine}.cfg')
  File "/global/homes/c/cbegeman/miniconda3/envs/mpas_dev/lib/python3.10/site-packages/mpas_tools/config.py", line 87, in add_from_package
    self._add(path, user=False)
  File "/global/homes/c/cbegeman/miniconda3/envs/mpas_dev/lib/python3.10/site-packages/mpas_tools/config.py", line 426, in _add
    raise FileNotFoundError(f'Config file does not exist: {filename}')
FileNotFoundError: Config file does not exist: /global/homes/c/cbegeman/miniconda3/envs/mpas_dev/lib/python3.10/site-packages/mache/machines/cori.cfg
xylar commented

Thanks @cbegeman!