Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
Expand Down Expand Up @@ -65,7 +65,7 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
IncludeCategories:
- Regex: '^"'
Priority: 1
- Regex: '^<'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
check_formatting:
uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master
with:
license_config: ".github/.licenserc.yaml"
license_config: ".licenserc.yaml"

test_nwx_docs:
uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master
Expand Down
5 changes: 3 additions & 2 deletions .github/.licenserc.yaml → .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ header:
- docs/Makefile
- LICENSE
- docs/requirements.txt
- version.txt
- version.txt
- build/

comment: never
comment: never
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cmaize_option_list(
BUILD_PYBIND11_PYBINDINGS ON "Should we build pybind11 python bindings?"
BUILD_CPP_JOULES OFF "Enable energy usage tracking with CPP Joules library?"
BUILD_CUDA_BINDINGS OFF "Enable CUDA Bindings"
BUILD_HIP_BINDINGS OFF "Enable HIP Bindings"
BUILD_HIP_BINDINGS OFF "Enable HIP Bindings"
BUILD_SYCL_BINDINGS OFF "Enable SYCL Bindings"
BUILD_PAPI_BINDINGS OFF "Enable PAPI Bindings"
)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
2 changes: 1 addition & 1 deletion cmake/build_device.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function(build_device)
set(CMAKE_CXX_STANDARD 17)
endif()

endfunction()
endfunction()

# Call the function we just wrote to get CMakePP
build_device()
66 changes: 41 additions & 25 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
# http://www.sphinx-doc.org/en/master/config

import os
import subprocess

# import subprocess

# -- Project information -----------------------------------------------------

project = u'parallelzone'
copyright = u'2021, NWChemEx Team'
author = u'NWChemEx Team'
project = "parallelzone"
copyright = "2021, NWChemEx Team"
author = "NWChemEx Team"

# Get the version from the git tag
# git_cmd = ['git', 'describe', '--tags', '--abbrev=0']
Expand All @@ -50,40 +51,45 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx',
'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax',
'sphinx.ext.githubpages', 'sphinx_tabs.tabs'
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.githubpages",
"sphinx_tabs.tabs",
]
dir_path = os.path.dirname(os.path.realpath(__file__))
doc_path = os.path.dirname(dir_path)
root_path = os.path.dirname(doc_path)

# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']
# templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

numfig = True
numfig_secnum_depth = 0
Expand All @@ -93,7 +99,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -104,7 +110,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -119,23 +125,20 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = project + 'doc'
htmlhelp_basename = project + "doc"

# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -145,33 +148,46 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, project + '.tex', project + ' Documentation', author,
'manual'),
(
master_doc,
project + ".tex",
project + " Documentation",
author,
"manual",
),
]

# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, project.lower(), project + ' Documentation',
[author], 1)]
man_pages = [
(master_doc, project.lower(), project + " Documentation", [author], 1)
]

# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, project, project + ' Documentation', author, project,
'One line description of project.', 'Miscellaneous'),
(
master_doc,
project,
project + " Documentation",
author,
project,
"One line description of project.",
"Miscellaneous",
),
]

# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# -- Options for todo extension ----------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions docs/source/developer/design/compp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ discuss the design of the ``CommPP`` class.
Why Do We Need CommPP?
**********************

ParallelZone needs access to MPI. ParallelZone is object-oriented and needs
something to bridge the gap between objects and types recognized by MPI. At a
high-level this leads to serialization, but naive application of serializaiton
in an MPI context can lead to inefficiencies. CommPP should automate the
ParallelZone needs access to MPI. ParallelZone is object-oriented and needs
something to bridge the gap between objects and types recognized by MPI. At a
high-level this leads to serialization, but naive application of serializaiton
in an MPI context can lead to inefficiencies. CommPP should automate the
conversion from objects to MPI data types in the most efficient manner possible.

*********************
Expand Down
22 changes: 11 additions & 11 deletions docs/source/developer/design/logger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ What is the Logger Class?

The ``Logger`` class is the user-facing API of ParallelZone's logging
component. The ``Logger`` class is used by users of ParallelZone to log
events, *i.e.*, errors, warnings, progress, etc.
events, *i.e.*, errors, warnings, progress, etc.

********************************
Why do we need the Logger Class?
********************************

As summarized in :ref:`logging_design`, we are not aware of any existing logging
solutions that do everything we need. We have thus chosen to implement the
missing features, to our liking, within the ``Logger`` class. The
missing features, to our liking, within the ``Logger`` class. The
``Logger`` class also provides a stable API for ParallelZone users in the event
we should need to add additional logging capabilities or switch out the backend.
The ``Logger`` class also separates the concern of "what to log" from "how to
Expand Down Expand Up @@ -74,8 +74,8 @@ Existing Logger Solutions
*************************

:ref:`existing_logging_solutions` covered the existing logging solutions in
detail and will not be replicated here. Instead we point out that of the
available choices, Spdlog has most of the features we want and is heavily
detail and will not be replicated here. Instead we point out that of the
available choices, Spdlog has most of the features we want and is heavily
supported. As seen in the next section we have opted to build our ``Logger``
infrastructure around Spdlog.

Expand All @@ -92,22 +92,22 @@ Logger Design

For the first implementation of the logging component we adopted the simple
architecture shown in Figure :numref:`logger_arch`. Users of ParallelZone see
one class, ``Logger``. As a first pass, ``Logger`` simply provides APIs
one class, ``Logger``. As a first pass, ``Logger`` simply provides APIs
for printing arbitrary data, already in a ``std::string`` (or implicitly
convertible to a ``std::string``) at various severity levels. Eventually, this
convertible to a ``std::string``) at various severity levels. Eventually, this
may be expanded to support more fine-grained control over the log formatting.

Internally ``Logger`` is implemented by a ``LoggerPIMPL`` object. The literal
``LoggerPIMPL`` object is an abstract base class which defines the API for
actual implementations. Our Spdlog-based implementation derives the
``LoggerPIMPL`` object is an abstract base class which defines the API for
actual implementations. Our Spdlog-based implementation derives the
``SpdlogPIMPL`` class from ``LoggerPIMPL`` to implement the parts of the PIMPL
API common to all Spdlog-based implementations.

For now we have two sinks, and they are implemented by further specializing the
``SpdlogPIMPL``. The sinks, ``StdoutSpdlog`` and ``FileSpdlog`` respectively
output logs to standard out and a specified file.
output logs to standard out and a specified file.

This design addresses the considerations remaining from
This design addresses the considerations remaining from
:ref:`logging_design` by:

1. Multiple logging levels.
Expand Down Expand Up @@ -143,4 +143,4 @@ particular we note:
we ultimately need to print strings so supporting of other types is simply
a convenience mechanism for channeling them into the string paths.
- Can add wide-character support. Spdlog already supports it so it's just a
matter of exposing it.
matter of exposing it.
11 changes: 5 additions & 6 deletions docs/source/developer/design/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Designing the Logging Component
###############################

ParallelZone provides a ``Logger`` class to facilitate recording of events,
ParallelZone provides a ``Logger`` class to facilitate recording of events,
i.e., print statements. The high-level design is summarized on this page.

*****************
Expand Down Expand Up @@ -261,7 +261,7 @@ Logging Design
Software architecture of ParallelZone's Logging component.

Ultimately none of the widely available logging solutions do everything we want
and we have chosen to have the user-facing logger be written by us. This
and we have chosen to have the user-facing logger be written by us. This
provides a stable API to users of ParallelZone, while allowing ParallelZone
developers to graft the missing features onto existing logging libraries.

Expand Down Expand Up @@ -312,7 +312,7 @@ This architecture addresses the considerations raised above by:

1. Multiple loggers.

- We can have multiple logger instances. Each instance is configured
- We can have multiple logger instances. Each instance is configured
for a specific scope (global vs. process-local).
- Thread-safety should avoid the need for a "thread-local" logger.

Expand All @@ -324,7 +324,7 @@ This architecture addresses the considerations raised above by:

The remaining issues, including the thread-safety requirement of consideration
3, are punted to the ``Logger`` class, which is the class actually
implementing the global and process-local loggers. The design of ``Logger``
implementing the global and process-local loggers. The design of ``Logger``
is provided here: :ref:`logger_design`.

*********************
Expand All @@ -338,7 +338,6 @@ if/when users want to customize logging more. In particular:
for specific instances. Turning on/off such loggers makes it easier to track
what's going on with the class and instances.
- Realistically we probably want a factory, or similar mechanism, for
setting up the initial loggers. Since our initialization choices are
setting up the initial loggers. Since our initialization choices are
presently very limited we punt on the factory until more choices become
available.

2 changes: 1 addition & 1 deletion include/parallelzone/archive_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ class ArchiveWrapper {

using Serializer = ArchiveWrapper<variant_output>;
using Deserializer = ArchiveWrapper<variant_input>;
} // namespace parallelzone
} // namespace parallelzone
2 changes: 1 addition & 1 deletion include/parallelzone/hardware/cpu/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ class CPU {
profile_return_type profile_it_(task_type&& task) const;
};

} // namespace parallelzone::hardware
} // namespace parallelzone::hardware
2 changes: 1 addition & 1 deletion include/parallelzone/logging/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

#pragma once
#include <parallelzone/logging/logger.hpp>
#include <parallelzone/logging/logger_factory.hpp>
#include <parallelzone/logging/logger_factory.hpp>
2 changes: 1 addition & 1 deletion include/parallelzone/serialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ template<typename T, typename Archive>
using is_deserializable = cereal::traits::is_input_serializable<T, Archive>;
using cereal::traits::detail::get_input_from_output;
using cereal::traits::detail::get_output_from_input;
} // namespace parallelzone
} // namespace parallelzone
2 changes: 1 addition & 1 deletion include/parallelzone/task/argument_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ struct ArgumentTraits {
std::is_same_v<rvalue_reference, T>;
};

} // namespace parallelzone::task
} // namespace parallelzone::task
2 changes: 1 addition & 1 deletion include/parallelzone/task/argument_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ class ArgumentWrapper {
holder_type m_value_;
};

} // namespace parallelzone::task
} // namespace parallelzone::task
Loading