More logging.

这个提交包含在:
craig-warren
2020-04-07 09:39:52 +01:00
父节点 4f9393d029
当前提交 416dce8d83
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@@ -25,7 +25,7 @@ from .contexts import MPIContext
from .utilities import setup_logging from .utilities import setup_logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
setup_logging(level=25) setup_logging(level=20)
def run( def run(
scenes=None, scenes=None,

查看文件

@@ -261,12 +261,12 @@ class ModelBuildRun:
# Check number of OpenMP threads # Check number of OpenMP threads
if config.sim_config.general['cpu']: if config.sim_config.general['cpu']:
logger.basic(f'CPU solver with {config.get_model_config().ompthreads} OpenMP threads on {platform.node()}\n') logger.basic(f'CPU (OpenMP) solver: {config.get_model_config().ompthreads} threads on {platform.node()}\n')
if config.get_model_config().ompthreads > config.sim_config.hostinfo['physicalcores']: if config.get_model_config().ompthreads > config.sim_config.hostinfo['physicalcores']:
logger.warning(Fore.RED + f"You have specified more threads ({config.get_model_config().ompthreads}) than available physical CPU cores ({config.sim_config.hostinfo['physicalcores']}). This may lead to degraded performance." + Style.RESET_ALL) logger.warning(Fore.RED + f"You have specified more threads ({config.get_model_config().ompthreads}) than available physical CPU cores ({config.sim_config.hostinfo['physicalcores']}). This may lead to degraded performance." + Style.RESET_ALL)
# Print information about any GPU in use # Print information about any GPU in use
elif config.sim_config.general['cuda']: elif config.sim_config.general['cuda']:
logger.basic(f"GPU solver with device {config.get_model_config().cuda['gpu'].deviceID} - {config.get_model_config().cuda['gpu'].name} on {platform.node()}\n") logger.basic(f"GPU solver: {config.get_model_config().cuda['gpu'].deviceID} - {config.get_model_config().cuda['gpu'].name} on {platform.node()}\n")
# Prepare iterator # Prepare iterator
if config.sim_config.general['progressbars']: if config.sim_config.general['progressbars']: