Util

namespace Cubism::Util

Namespace for input/output operations.

The members of this namespace are optional utilities that are not required to implement a working application. Its components form the content of libCubismUtil.a. An application using these utilities must link to -lCubismUtil.

Functions

std::ostream &operator<<(std::ostream &os, const INIParser &p)

Parameters
  • os: Output stream

  • p: INI parser instance

Variables

const char *CubismVersion

Cubism version at build time. Falls back to VERSION for a release.

Command:

git describe --long --dirty --broken

Example: v1.1.8-5-g824e676-dirty

The string starts with the version number, followed by the number of commits ahead of tagged commit (5 in this case), followed by g and the short hash (SHA-1) of HEAD, followed by the state of the working tree (if any).

class Histogram : public Cubism::Util::Sampler
#include <Histogram.h>

MPI profiling using histograms.

Collects samples for a profiled quantity of interest on individual ranks. Can be used to detect inhomogeneities among MPI ranks.

class INIParser
#include <INIParser.h>

INI config file parser.

Simple configuration file parser for use on the application level. CubismNova does not depend on this parser. The .ini file format is explained in more detail on Wikipedia for example. The python configparser module supports this format for convenient simulation case setup using python.

class Profiler : public Cubism::Util::Sampler
#include <Profiler.h>

Runtime profiler.

Used to collect runtime samples for a code section that is enclosed by the push() and pop() methods. Used for profiling.

class Sampler
#include <Sampler.h>

Sample collector.

Used to collect time samples (by default) for a code section that is enclosed by the seedSample() and collectSample() methods. Used for profiling.

Subclassed by Cubism::Util::Histogram, Cubism::Util::Profiler

class Timer
#include <Timer.h>

Simple timer class.