Skip to content
Snippets Groups Projects
Commit 558ad0bb authored by wfg's avatar wfg
Browse files

Verified that examples worked after merge

mpi and nompi:

helloBPWriter
timeBPWriter
parent 9761e6bd
No related branches found
No related tags found
2 merge requests!48Utilities,!45Code structure changes and syntax
......@@ -65,7 +65,7 @@ if(ADIOS_ENABLE_PIC)
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
endif()
option(ADIOS_USE_MPI "Enable the MPI version of ADIOS" OFF)
option(ADIOS_USE_MPI "Enable the MPI version of ADIOS" ON)
if(ADIOS_USE_MPI)
# Workaround for OpenMPI forcing the link of C++ bindings
add_definitions(-DOMPI_SKIP_MPICXX)
......
......@@ -28,30 +28,29 @@ IO::IO(const Settings &s, MPI_Comm comm)
// 1. Get method def from config file or define new one
adios::Method &bpWriterSettings = ad->DeclareMethod("output");
if (!bpWriterSettings.isUserDefined())
if (!bpWriterSettings.IsUserDefined())
{
// if not defined by user, we can change the default settings
bpWriterSettings.SetEngine("BPFileWriter"); // BP is the default engine
bpWriterSettings.AllowThreads(
1); // allow 1 extra thread for data processing
bpWriterSettings.AllowThreads(1); // for data processing
bpWriterSettings.AddTransport(
"File", "lucky=yes"); // ISO-POSIX file is the default transport
// Passing parameters to the transport
bpWriterSettings.SetParameters(
"have_metadata_file",
"yes"); // Passing parameters to the engine
bpWriterSettings.SetParameters(
"Aggregation",
std::to_string((s.nproc + 1) / 2)); // number of aggregators
const std::string aggregatorsParam("Aggregators=" +
std::to_string((s.nproc + 1) / 2));
bpWriterSettings.SetParameters("have_metadata_file=yes",
aggregatorsParam);
}
// define T as 2D global array
varT = &ad->DefineVariable<double>(
"T",
// Global dimensions
{s.gndx, s.gndy},
// local size, could be defined later using SetSelection()
{s.ndx, s.ndy},
// Global dimensions
{s.gndx, s.gndy},
// offset of the local array in the global space
{s.offsx, s.offsy});
......@@ -60,8 +59,7 @@ IO::IO(const Settings &s, MPI_Comm comm)
// varT.AddTransform( tr, "" );
// varT.AddTransform( tr,"accuracy=0.001" ); // for ZFP
bpWriter = ad->Open(m_outputfilename, "w", comm, bpWriterSettings,
adios::IOMode::COLLECTIVE);
bpWriter = ad->Open(m_outputfilename, "w", comm, bpWriterSettings);
if (bpWriter == nullptr)
throw std::ios_base::failure("ERROR: failed to open ADIOS bpWriter\n");
......
......@@ -26,15 +26,17 @@ foreach(adios2_target IN LISTS adios2_targets)
engine/bp/BPFileReader.cpp
engine/bp/BPFileWriter.cpp
format/BP1.cpp
format/BP1Aggregator.cpp
format/BP1Writer.cpp
functions/adiosFunctions.cpp
transport/file/FStream.cpp
transport/file/FileDescriptor.cpp
transport/file/FilePointer.cpp
utilities/format/bp1/BP1Base.cpp
utilities/format/bp1/BP1Aggregator.cpp
utilities/format/bp1/BP1Writer.cpp
utilities/profiling/iochrono/Timer.cpp
)
target_include_directories(${adios2_target}
PUBLIC ${ADIOS_SOURCE_DIR}/include
......
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