Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Kube committed Oct 22, 2020
1 parent e4deada commit b8f5909
Show file tree
Hide file tree
Showing 12 changed files with 248 additions and 32 deletions.
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# DELTA-FUSION (aDaptive rEaL Time Analysis of big fusion data)

This project facilitates near real-time streaming analysis of big fusion data on HPC resources.


This project implements a streaming analysis workflow. Data is streamed by a generator, using the new
ADIOS2 WAN capabilities, to a processing facility. At the processing facility, the received data packets
are analyzed and stored by a backend. Optional visualization can be attached by coupling to the backend.

This repository is a loose collection of
* generators
* processors
* backends

The implemented analysis routines are based on [https://www.github.com:minjunJchoi/fluctana](https://www.github.com:minjunJchoi/fluctana) refactored in cython and adapted as computational kernels

Generators, processors, and backends read their configuration from a shared json file. The different
implementations don't have a common syntax yet.
Delta facilitates near real-time streaming analysis of big fusion data on
remote HPC resources. It consists of multiple executables that send,
receive, and process data on different machines. The picture below gives an
overview of Delta.

Here is a diagram of the framework:
![Delta Architecture](https://github.com/rkube/delta/blob/master/doc/delta_architecture.png "Delta Architecture")
![Delta Architecture](https://github.com/rkube/delta/blob/master/docs/source/delta_arch_v02.png "Delta Architecture")

# Implemented Workflows

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file removed docs/delta_architecture.png
Binary file not shown.
Binary file removed docs/delta_network_perf.png
Binary file not shown.
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
55 changes: 55 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


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

project = 'Delta-fusion'
copyright = '2020, R. Kube, R.M. Churchill, J. Choi, J. Wang'
author = 'R. Kube, R.M. Churchill, J. Choi, J. Wang'

# The full version, including alpha/beta/rc tags
release = '0.0.1'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

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

# 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 = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# 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']
7 changes: 7 additions & 0 deletions docs/source/configuring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
***********************************
Configuring data analysis workflows
***********************************

The behaviour of `Delta` is defined by a global configuration file


Binary file added docs/source/delta_arch_v02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. Delta-fusion documentation master file, created by
sphinx-quickstart on Thu Oct 22 11:55:40 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Delta-fusion's documentation!
========================================
Delta facilitates near real-time streaming analysis of big fusion data on
remote HPC resources. It consists of multiple executables that send,
receive, and process data on different machines. The picture below gives an
overview of Delta.


.. figure:: delta_arch_v02.png
:align: center

Target architecture of Delta

At the data generation site, a `generator` reads measurement data from file and stages
it for streaming. The data stream is received by a `middleman` that forwards it
to the `processor`, which executes data analysis kernels on a supercomputer.
The analysis results are stored and made available to web-clients by a separate
webserver.

This documentation describes the capabilities of `Delta`, how to configure it and
how to launch distributed anaylsis workflows.


Guide
^^^^^


.. toctree::
:maxdepth: 2

configuring
launching



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
80 changes: 80 additions & 0 deletions docs/source/launching.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
*********************************************
Launching data analysis workflows using Delta
*********************************************




1-node scenario
###############
In this scenario Delta will run on a single node only. This is the recommended way
to test data analysis workflows.

The commands below set up the environment on cori to start the processor:

.. code-block:: shell
#!/bin/bash
module unload PrgEnv-cray PrgEnv-gnu PrgEnv-intel
module load PrgEnv-gnu
module unload craype-hugepages2M
module unload python
module load python3
module use -a /global/cscratch1/sd/jyc/sw/modulefiles
module load adios2/devel
module load python_delta_comm
export OMP_NUM_CORES=4
export OMP_PROC_BIND=true
export OMP_PLACES=cores
srun -n 16 -c 4 --cpu-bind=cores python -m mpi4py.futures processor.py --config configs/delta_config.json
2-node scenario
###############
In this scenario, the `generator` streams data directly to the `proceessor`.

The recommended way is to start the `processor` on cori. You may need to increase the
timeout in the message queues to accomodate a longer wait for initial time chunks.
After the processor has started, launch the generator on the KSTAR DTN:

The commands below set up the environment on the KSTAR DTN to start the generator

.. code-block:: shell
module use -a /home/choij/sw/spack/share/spack/modules/linux-centos7-haswell
module use -a /home/choij/sw/spack/share/spack/modules/linux-centos7-broadwell
module use -a /home/choij/sw/modulefiles
module load openmpi
module load zeromq adios2
module load python py-numpy py-mpi4py py-h5py py-scipy
mpirun -n 1 python generator.py --config configs/test_2node.json
3-node scenario
###############
In this scenario the `generator` streams data to a `middleman` which forwards the
packages to the `processor`.

The recommended way is to start the `processor` first, then the `middleman`, and
finally the `generator`.

The commands below set up the environment on the NERSC DTN to start the middleman

.. code-block:: shell
#!/bin/bash
module use -a /global/cscratch1/sd/jyc/dtn/sw/spack/share/spack/modules/linux-centos7-ivybridge
module load openmpi
module load zeromq
module load python py-numpy py-mpi4py py-h5py py-scipy py-matplotlib py-pyyaml
module use -a /global/cscratch1/sd/jyc/dtn/sw/modulefiles
module load adios2
module load python_delta_comm
python middleman.poy --config configs/test_3node.json
8 changes: 0 additions & 8 deletions startup_dtn.sh

This file was deleted.

7 changes: 0 additions & 7 deletions startup_kstar.sh

This file was deleted.

0 comments on commit b8f5909

Please sign in to comment.