simsopt.util package

simsopt.util.initialize_logging(filename: str | None = None, level: str | None = None, mpi: bool = False) None

Initializes logging in a simple way for both serial and MPI jobs. The MPI logging uses MPILogger package.

Parameters:
  • filename – Name of file to store the logging info

  • level – Logging level. Could be ‘INFO’, ‘DEBUG’, ‘WARNING’, etc.

  • mpi – If True MPI logging is used provided mpi4py is installed.

simsopt.util.log(level: int = 20)

Turn on logging. If MPI is available, the processor number will be added to all logging entries.

Parameters:

level – Typically logging.INFO for regular output, or logging.DEBUG for more extensive output.