Studying the Error class
In this section, we will analyze the Error
class and its source code, which can be found in the error.cpp
and error.h
files.
Before we begin, we will introduce the concepts of Universe and World with regard to parallel processing – a universe consists of all the tasks in the simulation, whereas a world refers to the number of cores dedicated to each task. Subsequently, the world and universe IDs differ only if the simulation runs on more than one partition via -partition command-line switch
(see https://lammps.sandia.gov/doc/Run_options.html). Once a set of cores finish a task, the cores execute the next task immediately after, and each task is considered a universe that is executed by a world of constituent cores.
The Error
class is used when we intend to display an error message or print information in order to debug. Several types of error messages are offered:
- The
Error::all()
method - The
Error::one()
method - The
Error::warning...