Skip to content
Snippets Groups Projects
Commit bdf08705 authored by Podhorszki, Norbert's avatar Podhorszki, Norbert
Browse files

writer uses command line config file as well

parent 5fbab031
No related branches found
No related tags found
1 merge request!326Refactored heat transfer example. A config file is now command line a…
......@@ -11,7 +11,7 @@
====================================-->
<io name="writer">
<engine type="BPFileWriter">
<engine type="ADIOS1Writer">
<!-- for vectorized memory operations, make sure your system
enables threads-->
......
......@@ -14,13 +14,6 @@
#include <adios2.h>
#define str_helper(X) #X
#define str(X) str_helper(X)
#ifndef DEFAULT_CONFIG
#define DEFAULT_CONFIG config.xml
#endif
#define DEFAULT_CONFIG_STR str(DEFAULT_CONFIG)
adios2::ADIOS *ad = nullptr;
adios2::Engine *bpWriter = nullptr;
adios2::Variable<double> *varT = nullptr;
......@@ -29,12 +22,11 @@ adios2::Variable<unsigned int> *varGndx = nullptr;
IO::IO(const Settings &s, MPI_Comm comm)
{
m_outputfilename = s.outputfile + ".bp";
ad = new adios2::ADIOS(std::string(DEFAULT_CONFIG_STR), comm,
adios2::DebugON);
ad = new adios2::ADIOS(s.configfile, comm, adios2::DebugON);
// Define method for engine creation
adios2::IO &bpio = ad->DeclareIO("output");
adios2::IO &bpio = ad->DeclareIO("writer");
if (!bpio.InConfigFile())
{
// if not defined by user, we can change the default settings
......
<?xml version="1.0"?>
<!-- Config XML file fo the heatTransfer_write_adios2 executable in .
build/bin from IO_adios2.cpp -->
<adios-config>
<io name="output">
<engine type="BPFileWriter">
<!-- for vectorized memory operations, make sure your system
enables threads-->
<parameter key="Threads" value="2"/>
<!-- Microseconds (default), Milliseconds, Seconds,
Minutes, Hours -->
<parameter key="ProfileUnits" value="Microseconds"/>
<!-- XXKb, XXMb, or XXXGb supported, default=16Kb
(applications might choose an optimal value) -->
<parameter key="InitialBufferSize" value="16Kb"/>
<!-- XXKb, XXMb, or XXXGb supported, default=Unlimited (until
fails), maximum at each time step
(applications might choose an optimal value) -->
<!-- <parameter key="MaxBufferSize" value="2Gb"/> -->
<!-- exponential growth factor > 1, default = 1.05
1.05 is good for a few large variables, for many small
variables increase the value to 1.5 to 2
(optimal value is application dependent)-->
<!-- <parameter key="BufferGrowthFactor" value="1.05"/> -->
</engine>
<transport type="File">
<!-- POSIX, stdio (C FILE*), fstream (C++) -->
<parameter key="Library" value="POSIX"/>
<!-- For read/write, Microseconds (default), Milliseconds, Seconds,
Minutes, Hours. open/close always in Microseconds -->
<parameter key="ProfileUnits" value="Microseconds"/>
</transport>
</io>
</adios-config>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment