Skip to content

BUG: Fixed bug in WL ensemble by replacing logger.warning by warnings.warn.

Description

The fact that a icet.input_output.logging_tools.logger instance is initiated when a WangLandauEnsemble is created makes it possible that some processes might hang, when running multiple WL simulations in parallel using the multiprocessing module, for the reasons detailed in this bug report. It is, therefore, better to use warnings.warn, instead of creating logger and issuing a logger.warning, to notify the user that a simulation has converged.

Summary of changes

To consider

Before submitting your merge request make sure that licenses that might apply to the code that is being submitted are compliant with the license used for this code base. By submitting your code to this repository you also agree that your code will be distributed as part of this code base under the license conditions that apply.

Instructions for code review

Please make sure

  • all new code is tested (and works obviously)
  • all new code is documented; examples are strongly encouraged
  • all new code is type hinted (Note: Type hints are automatically rendered in the documentation when they appear in function/method docstrings; parameter descriptions in class docstrings must be annotated explicitly.)
  • variable and function names are in snake_case while class names are in CamelCase
  • imports are in alphabetical order both with respect to module names and imported members; core library imports come first in a separate block; import lines go before from lines (This is done to allow other contributors to quickly find imports.)
  • all "must-pass" jobs in the CI pass (which includes enforcing flake8 compliance); "can-fail" jobs do not deteriorate
  • examples in the documentation use doctest (both sphinx and docstrings)
  • code that is commented out should be removed (unless there are very good reasons not to)
  • comments that are unclear (e.g., "this should work ..." or "I don't know whether this works ...") need to be resolved first
  • todos should be resolved/avoided as much as possible

Closes #506 (closed)

Merge request reports