-
Notifications
You must be signed in to change notification settings - Fork 5
1. Getting Started
lukemartinlogan edited this page Jun 5, 2023
·
2 revisions
For this, we will go through an example.
Gray-Scott is a 7-point 3D stencil code for modeling the chemical diffusion of two substances.
git clone https://github.com/pnorbert/adiosvm.git
cd adiosvm/Tutorial/grey-scott
spack load adios2
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j8
Modify the adios2.xml to replace all tags with the following snippet.
<engine type="Plugin">
<parameter key="PluginName" value="/tmp/myFile.bp" />
<parameter key="PluginLibrary" value="hermes_engine" />
<!-- any parameters needed for your plugin can be added here in the parameter tag -->
</engine>
NOTE: /tmp/myFile.bp can be wherever you would like to put the output data for this file.
The resulting file should look as follows:
<?xml version="1.0"?>
<adios-config>
<!--============================================
Configuration for Gray-Scott and GS Plot
============================================-->
<io name="SimulationOutput">
<engine type="Plugin">
<parameter key="PluginName" value="/tmp/myFile.bp" />
<parameter key="PluginLibrary" value="hermes_engine" />
<!-- any parameters needed for your plugin can be added here in the parameter tag -->
</engine>
</io>
<!--===========================================
Configuration for PDF calc and PDF Plot
===========================================-->
<io name="PDFAnalysisOutput">
<engine type="Plugin">
<parameter key="PluginName" value="/tmp/myFile.bp" />
<parameter key="PluginLibrary" value="hermes_engine" />
<!-- any parameters needed for your plugin can be added here in the parameter tag -->
</engine>
</io>
<!--====================================
Configuration for isosurface,
find_blobs and render_isosurface
====================================-->
<io name="IsosurfaceOutput">
<engine type="Plugin">
<parameter key="PluginName" value="/tmp/myFile.bp" />
<parameter key="PluginLibrary" value="hermes_engine" />
<!-- any parameters needed for your plugin can be added here in the parameter tag -->
</engine>
</io>
<!--================================================
Configuration for Gray-Scott (checkpointing)
================================================-->
<io name="SimulationCheckpoint">
<engine type="Plugin">
<parameter key="PluginName" value="/tmp/myFile.bp" />
<parameter key="PluginLibrary" value="hermes_engine" />
<!-- any parameters needed for your plugin can be added here in the parameter tag -->
</engine>
</io>
</adios-config>
COEUS is installed as a shared library (libhermes_engine.so). If you haven't done make install or aren't using spack, COEUS will be placed under ${CMAKE_BINARY_DIR}/bin.
# NOTE: This export is not required if using spack
export LD_LIBRARY_PATH=/path/to/coeus/lib (the directory which contians libhermes_engine.so)
mpirun -n 4 build/gray-scott simulation/settings-files.json
Your output data will be placed in /tmp/myFile.bp.