-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from pnorbert/gray-scott-inline
Added the inline setup for Gray-Scott using Paraview-ADIOS2 inline pl…
- Loading branch information
Showing
7 changed files
with
357 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0"?> | ||
<adios-config> | ||
|
||
<!--============================================ | ||
Configuration for Gray-Scott and GS Plot | ||
============================================--> | ||
|
||
<io name="SimulationOutput"> | ||
<engine type="plugin"> | ||
<!-- general plugin engine parameters --> | ||
<parameter key="PluginName" value="fides"/> | ||
<parameter key="PluginLibrary" value="ADIOSInSituPlugin"/> | ||
<!-- ParaViewFides engine parameters --> | ||
<parameter key="DataModel" value="catalyst/gs-fides.json"/> | ||
<parameter key="Script" value="catalyst/gs-pipeline.py"/> | ||
</engine> | ||
</io> | ||
|
||
<!--=========================================== | ||
Configuration for PDF calc and PDF Plot | ||
===========================================--> | ||
|
||
<io name="PDFAnalysisOutput"> | ||
<engine type="FileStream"> | ||
<!-- SST engine parameters --> | ||
<parameter key="RendezvousReaderCount" value="1"/> | ||
<parameter key="QueueLimit" value="5"/> | ||
<parameter key="QueueFullPolicy" value="Block"/> | ||
<!-- BP4/SST engine parameters --> | ||
<parameter key="OpenTimeoutSecs" value="10.0"/> | ||
<!-- SSC engine parameters --> | ||
<parameter key="MaxStreamsPerApp" value="2"/> | ||
</engine> | ||
|
||
<!-- Compress variables --> | ||
<!-- | ||
<variable name="U"> | ||
<operation type="sz"> | ||
<parameter key="accuracy" value="0.001"/> | ||
</operation> | ||
</variable> | ||
<variable name="V"> | ||
<operation type="sz"> | ||
<parameter key="accuracy" value="0.001"/> | ||
</operation> | ||
</variable> | ||
--> | ||
</io> | ||
|
||
<!--==================================== | ||
Configuration for isosurface, | ||
find_blobs and render_isosurface | ||
====================================--> | ||
|
||
<io name="IsosurfaceOutput"> | ||
<engine type="FileStream"> | ||
</engine> | ||
</io> | ||
|
||
<!--================================================ | ||
Configuration for Gray-Scott (checkpointing) | ||
================================================--> | ||
|
||
<io name="SimulationCheckpoint"> | ||
<engine type="FileStream"> | ||
</engine> | ||
</io> | ||
|
||
|
||
<!-- example engines | ||
<engine type="BPFile"/> | ||
<engine type="BP4"/> | ||
<engine type="HDF5"/> | ||
<engine type="SST"/> | ||
<engine type="InSituMPI"/> | ||
=== SST === | ||
SST can be set up to force blocking the producer on a consumer | ||
or to discard unused data. Separately, it can be also set up | ||
so that the producer is waiting for a first connection or | ||
just starts running alone. | ||
Producer start alone, and it does not keep data. | ||
Consumer will get recent data when connects. | ||
If consumer(s) goes away, producer runs alone and | ||
discards data. | ||
<engine type="SST"> | ||
<parameter key="RendezvousReaderCount" value="0"/> | ||
<parameter key="QueueLimit" value="1"/> | ||
<parameter key="QueueFullPolicy" value="Discard"/> | ||
</engine> | ||
Producer will wait for 1 consumer to connect before proceeding. | ||
Producer will buffer 5 output steps so a consumer may lag behind a bit. | ||
If consumer(s) goes away, producer will block indefinitely after | ||
the buffer is full. | ||
<engine type="SST"> | ||
<parameter key="RendezvousReaderCount" value="1"/> | ||
<parameter key="QueueLimit" value="5"/> | ||
<parameter key="QueueFullPolicy" value="Block"/> | ||
</engine> | ||
=== BP4 === | ||
BP4 is a new file format. | ||
'SubStreams' parameter controls how many files | ||
are created under the output folder. By default, each process | ||
writes its own file (N-to-N pattern), which is fast but is | ||
not scalable to tens of thousands of processes. The number of | ||
substreams should be chosen for the capability of the underlying | ||
filesystem (e.g. twice the number of OST servers on a Lustre file system). | ||
'OpenTimeoutSecs' paramter specifies how long to wait on a reading Open | ||
for the file to appear. Useful for streaming when the reader starts up | ||
faster than the writer produce any output. | ||
<engine type="BPFile"> | ||
<parameter key="SubStreams" value="4"/> | ||
<parameter key="OpenTimeoutSecs" value="10.0"/> | ||
</engine> | ||
=== BPFile === | ||
BPFile is a token name for the BP3 old file format. | ||
It will refer to BP4 in the future. | ||
'SubStreams' parameter is the same as for BP4. | ||
<engine type="BPFile"> | ||
<parameter key="SubStreams" value="4"/> | ||
</engine> | ||
=== InSituMPI === | ||
One must launch producer and consumer as one MPI appliction in MPMD mode. | ||
See Readme.md | ||
Note: This engine does not support the high-level Python API in the plot | ||
scripts, so it can only be used to couple the simulation and PDF calculation. | ||
--> | ||
</adios-config> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"VTK-Cartesian-grid": { | ||
"data_sources": [ | ||
{ | ||
"name": "source", | ||
"filename_mode": "input" | ||
} | ||
], | ||
"step_information": { | ||
"data_source": "source", | ||
"variable": "step" | ||
}, | ||
"coordinate_system" : { | ||
"array" : { | ||
"array_type" : "uniform_point_coordinates", | ||
"dimensions" : { | ||
"source" : "variable_dimensions", | ||
"data_source": "source", | ||
"variable" : "U" | ||
}, | ||
"origin" : { | ||
"source" : "array", | ||
"values" : [0.0, 0.0, 0.0] | ||
}, | ||
"spacing" : { | ||
"source" : "array", | ||
"values" : [0.1, 0.1, 0.1] | ||
} | ||
} | ||
}, | ||
"cell_set": { | ||
"cell_set_type" : "structured", | ||
"dimensions" : { | ||
"source" : "variable_dimensions", | ||
"data_source": "source", | ||
"variable" : "U" | ||
} | ||
}, | ||
"fields": [ | ||
{ | ||
"name": "U", | ||
"association": "points", | ||
"array" : { | ||
"array_type" : "basic", | ||
"data_source": "source", | ||
"variable" : "U" | ||
} | ||
}, | ||
{ | ||
"name": "V", | ||
"association": "points", | ||
"array" : { | ||
"array_type" : "basic", | ||
"data_source": "source", | ||
"variable" : "V" | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from paraview.simple import * | ||
from paraview import print_info | ||
|
||
# catalyst options | ||
from paraview.catalyst import Options | ||
options = Options() | ||
|
||
# print start marker | ||
print_info("begin '%s'", __name__) | ||
|
||
# directory under which to save all extracts | ||
# generated using Extractors defined in the pipeline | ||
# (optional, but recommended) | ||
options.ExtractsOutputDirectory = '.' | ||
SaveExtractsUsingCatalystOptions(options) | ||
|
||
view = CreateRenderView() | ||
# when using Fides, registrationName is always 'fides' | ||
producer = TrivialProducer(registrationName='fides') | ||
display = Show(producer) | ||
view.ResetCamera() | ||
ColorBy(display, ('POINTS', 'U')) | ||
display.RescaleTransferFunctionToDataRange(True, False) | ||
display.SetScalarBarVisibility(view, True) | ||
transFunc = GetColorTransferFunction('U') | ||
transFunc.RescaleOnVisibilityChange = 1 | ||
|
||
display.SetRepresentationType('Surface') | ||
|
||
clip = Clip(registrationName="clip1", Input=producer) | ||
clip.ClipType = 'Plane' | ||
clip.Scalars = ['POINTS', 'U'] | ||
clip.ClipType.Origin = [1.5, 1.5, 1.5] | ||
clip.ClipType.Normal = [0.0, 1.0, 0.0] | ||
clipDisplay = Show(clip, view, 'UnstructuredGridRepresentation') | ||
|
||
Hide(producer, view) | ||
view.ResetCamera() | ||
|
||
camera = GetActiveCamera() | ||
camera.Azimuth(45) | ||
camera.Elevation(45) | ||
|
||
# the extractor will save the view on each time step | ||
extractor = CreateExtractor('PNG', view, registrationName='PNG1') | ||
extractor.Writer.FileName = 'output-{timestep}.png' | ||
extractor.Writer.ImageResolution = [800, 800] | ||
|
||
|
||
def catalyst_execute(info): | ||
print_info("in '%s::catalyst_execute'", __name__) | ||
global producer | ||
producer.UpdatePipeline() | ||
print("updating pipeline and saving image") | ||
|
||
#print("-----------------------------------") | ||
#print("executing (cycle={}, time={})".format(info.cycle, info.time)) | ||
#print("bounds:", producer.GetDataInformation().GetBounds()) | ||
#print("U-range:", producer.PointData['U'].GetRange(0)) | ||
#print("V-range:", producer.PointData['V'].GetRange(0)) | ||
|
||
|
||
# print end marker | ||
print_info("end '%s'", __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The ${PARAVIEW_BUILD_PATH}/lib directory should contain `libADIOSInSituPlugin.so`. | ||
export PARAVIEW_BUILD_PATH=/home/adios/Software/paraview/build | ||
# Set the following env variables. | ||
export ADIOS2_PLUGIN_PATH=${PARAVIEW_BUILD_PATH}/lib | ||
export CATALYST_IMPLEMENTATION_NAME=paraview | ||
export CATALYST_IMPLEMENTATION_PATHS=${PARAVIEW_BUILD_PATH}/lib/catalyst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"L": 64, | ||
"Du": 0.2, | ||
"Dv": 0.1, | ||
"F": 0.02, | ||
"k": 0.048, | ||
"dt": 2.0, | ||
"plotgap": 100, | ||
"steps": 1000, | ||
"noise": 0.0000001, | ||
"output": "gs.bp", | ||
"checkpoint": true, | ||
"checkpoint_freq": 700, | ||
"checkpoint_output": "ckpt.bp", | ||
"restart": false, | ||
"restart_input": "ckpt.bp", | ||
"adios_config": "adios2-inline-plugin.xml", | ||
"adios_span": false, | ||
"adios_memory_selection": false, | ||
"mesh_type": "image" | ||
} |