Debugging and profiling

When implementing new features in Octopus, it is often convenient to be able to get debug information or profiling information. Octopus offers several internal tools to allow for debugging and profiling, which are explained in this page.

Parsed variables from an input file

If you look at the file exec/parser.log , it will tell you the value of the variables that you set with the inp file, as well as all the variables which are taking their default value. This can sometimes be helpful in understanding the behavior of the program. In particular, all the values of the variables are present, but also all the variables that were implicitely parsed (hence using their default values) are stated.

Stack trace and verbose mode

The variable Debug allows for different different level of diagnostic:

Note that options could be combined, like Debug=info+trace

Memory and performance profiling

Octopus offers several ways to profile memory. It is possible to get a report of the memory used using ReportMemory=yes. Alternatively, one can get ProfilingMode=prof_memory or ProfilingMode=prof_memory_full to get memory reports with different level of details.

The elapsed time profiling is obtained by ProfilingMode=prof_time. This is a lightweight profiler that has no impact on the code performances, and can hence be used to understand better where the time is spent.

Other options

There exists some more internal variables for advanced debugging and profiling. Please refer to their variable description: