HPS-MC
 
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1import shutil
2
3from ._config import _read_global_config
4from ._logging import _setup_logging
5
6# To play nice with Lustre, but only effective as of python 3.8
7shutil.COPY_BUFSIZE = 1024 * 1024
8
9# Load the global configuration settings.
10# Accessing this variable from other modules like job is fine.
11global_config, _config_files = _read_global_config()
12
13# Setup global logging.
14# This should not be accessed directly from other modules.
15_global_logger = _setup_logging(global_config)
16
17# Print a log message showing what global config files were found and loaded.
18if len(_config_files) > 0:
19 _global_logger.info("Config files found: {}".format(_config_files))
20else:
21 _global_logger.warn("No config files were found at default locations! (`~/.hpsmc` or `.hpsmc` in your current directory)")
22
23# import hadd down here so global_config is defined
24from ._hadd import hadd # nopep8