libadc-cxx 1.0.0
Structured logging for scientific computing
Loading...
Searching...
No Matches
adc.hpp
Go to the documentation of this file.
1/* Copyright 2025 NTESS. See the top-level LICENSE.txt file for details.
2 *
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef adc_hpp
6#define adc_hpp
7#include "adc/adc_config.h"
8#include "adc/factory.hpp"
9#include "adc/utility.hpp"
10
11/** \brief Application Data Collection: Structured logging for scientific computing.
12\mainpage Application Data Collection (C++)
13
14\section purpose Purpose (why)
15The ADC project aims to provide workflow metadata collection for all scientific computing environments and workflow stages.
16Here 'metadata' means small, structured descriptions of:
17 - what is planned (such as a campaign of multiple jobs, or in a single job being submitted)
18 - what is happening (such as the data sizes and features in an individual execution or rank of a parallel execution)
19 - what has happened (such as scalar progress indicators or final results)
20
21These *complement* large data flows such as:
22 - time-series hardware metrics (papi, LDMS)
23 - call-profiling data (caliper, kokkos, gprof, ...)
24 - lists of particle or geometric entities and associated engineering or physics data (hdf5, netcdf, exodus, commercial CAD formats)
25 .
26The metadata logged is intended for analysis during or after the current workflow step to allow:
27 - other tooling to influence subsequent steps, such as compute resource selection.
28 - users to track workflow progress.
29 - performance analysts to correlate and predict performance based on simulation metadata.
30 - software developers and managers to prioritize feature work based on usage.
31 - software agents to detect when system performance is below expectations.
32
33\section data Output (what)
34ADC produces *semi-structured*, extensible json messages. Some json objects have standardized names and contents; these
35are included in a message if a convenience function is called to add them to the message. If specific
36names are present, the associated values have standard origins.
37Other objects have minimally defined fields, with the rest of the fields being up to the application.
38Where common json libraries exist, the application may also attach arbitrary json objects to a message; this support
39varies by implementation language. The \ref adc::builder_api provides a rich set of convenience functions for constructing
40and customizing ADC messages that capture scientific programming data types.
41
42\section environments Environments (where)
43Scientific workflows span desktop, server, and cluster environments. Critical information
44is usually added (or first exposed) at each stage. Linux environments are directly supported
45as well as Windows environments connected through Java.
46
47\section bindings Languages (how)
48Initially, C++, Python, Java are supported, and likely this will expand to C, Fortran and JavaScript.
49Documented here is the C++17 standard library-based binding that has optional support for MPI.
50This binding follows the Factory pattern (\ref adc::factory). The factory provides json builder objects and publisher objects.
51
52Interface support for later C++ standards is anticipated, as standard support for
53basic character and numerical types evolves.
54
55\section library Linking
56- Link with -ladc_cxx
57To link adct-cxx with and without MPI dependencies, make two separate installations and
58build your code with one or the other.
59
60\section publishers Performance
61The data collected is published as the application runs, and is fully labeled with
62data types for downstream interpretation up to decades into the future.
63
64A variety of plugins implement the \ref adc::publisher_api
65to ensure transmission performance and overhead demands are met
66for each scientific environment. Messages can be sent directly to the REST-based infrastructure, or
67(in HPC scenarios) routed through any bus which can support json (such as LDMS or a cache file).
68
69\section apilist Just show me the code:
70APIs:
71- \ref adc::factory
72- \ref adc::builder_api
73- \ref adc::publisher_api
74
75Examples:
76- \ref mpiSimpleDemo.cpp demonstrates instrumenting a trivial MPI program.
77
78 */
79/**
80\defgroup API Factory and interfaces for application use
81*/
82namespace adc {
83
84} // namespace adc
85#endif // adc_hpp
Definition adc.hpp:82