You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, CABLE is inconsistent in how the program is aborted or STOPed throughout the code base. For example, when using an MPI build, STOP should be replaced with a call to MPI_Abort (via mpi_grp_abort) and there is also an abort subroutine defined in cable_abort_module which is sometimes used. It would be nice if these approaches were consolidated across the codebase (also potentially for use in the coupled model).
A nice (but maybe naive) approach would be to use the existing abort functionality to encapsulate the abort logic however this will probably depend on some state in the top level scope (e.g. the current MPI rank or the total number of MPI ranks). Passing this state information as an argument to abort seems like it will be a bit burdensome to pass throughout the entire code base. A better approach could be to instantiate a singleton logging object to handle the logging and abort behaviour.
This also raises questions on how we want do error handling and logging in general (also in a coupled model context noting that CABLE maybe built as a library in the future). It would be good to have an idea of the key requirements for a consolidated logging and error handling framework for CABLE.
The text was updated successfully, but these errors were encountered:
Runtime switch which controls: 1. writing logs only to the log file or 2. writing logs only to standard output/error or 3. writing logs both to the log file and standard output/error
Runtime switch which controls the amount of logging for different severity/verbosity levels.
Currently, CABLE is inconsistent in how the program is aborted or
STOP
ed throughout the code base. For example, when using an MPI build,STOP
should be replaced with a call toMPI_Abort
(viampi_grp_abort
) and there is also anabort
subroutine defined incable_abort_module
which is sometimes used. It would be nice if these approaches were consolidated across the codebase (also potentially for use in the coupled model).A nice (but maybe naive) approach would be to use the existing
abort
functionality to encapsulate the abort logic however this will probably depend on some state in the top level scope (e.g. the current MPI rank or the total number of MPI ranks). Passing this state information as an argument toabort
seems like it will be a bit burdensome to pass throughout the entire code base. A better approach could be to instantiate a singleton logging object to handle the logging and abort behaviour.This also raises questions on how we want do error handling and logging in general (also in a coupled model context noting that CABLE maybe built as a library in the future). It would be good to have an idea of the key requirements for a consolidated logging and error handling framework for CABLE.
The text was updated successfully, but these errors were encountered: