Skip to content

MPI Benchmark#346

Merged
ax3l merged 4 commits intoopenPMD:devfrom
franzpoeschel:topic-mpiBenchmark
Nov 30, 2018
Merged

MPI Benchmark#346
ax3l merged 4 commits intoopenPMD:devfrom
franzpoeschel:topic-mpiBenchmark

Conversation

@franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Sep 14, 2018

Adds a generic MPI benchmark to openPMD (#37).

Todo:

  • The reading benchmark fails when using the ADIOS1 backend (openPMD::unsupported_data_error: Unsupported attribute datatype)
  • Feature requests?
  • Resolve strange MPI behaviour (see MPIBenchmarkReport.hpp → addReport() method)
  • Adjust documentation to refactoring
  • Add user documentation (*.rst).
  • Add licensing information

@ax3l
Copy link
Member

ax3l commented Sep 25, 2018

Just as a general feature request: it would be cool if this tool allows easy, user-level performance benchmarks on clusters similar to what we did in Figure 1 in https://arxiv.org/abs/1706.00522 . So that we can easily switch backends, compression, written size per node and the like.

@franzpoeschel
Copy link
Contributor Author

franzpoeschel commented Sep 26, 2018

Thanks for your suggestions, the figure gives a good guideline.
I am not yet fully done (currently having a little fight with MPI), but next to some refactoring I have added support for picking multiple backends and multiple numbers of threads to be used for the benchmark.
The total extent of the written dataset is still fixed during one benchmark to give comparable results. Do you think it would be useful being able to instruct the Benchmark to be executed for several dataset extents?
So in total, the user currently picks

  1. compression schemes
  2. backends (per filename extension)
  3. number of threads to be used

and the benchmark is then executed for every possible combination of entered values.

edit: this has changed now, look into the documentation

@ax3l
Copy link
Member

ax3l commented Oct 3, 2018

Do you think it would be useful being able to instruct the Benchmark to be executed for several dataset extents?

Yep, sounds useful since it controls the data per node.

We should write both particle and mesh data, but I am ok to start with the latter.

@ax3l ax3l mentioned this pull request Oct 4, 2018
@franzpoeschel
Copy link
Contributor Author

Yep, sounds useful since it controls the data per node.

I have expressed myself unclearly, the Benchmark class already allows choosing the part of the dataset to write per rank relatively freely. The user can choose this be passing to the constructor an implementation of the BlockSlicer abstract class. Once the BlockSlicer is chosen, it is currently fixed to allow for comparable results – unlike compression strategies, backends and thread sizes which can be altered.

We should write both particle and mesh data, but I am ok to start with the latter.

To be fair, I just copied that part from here, I will look into it.

@franzpoeschel franzpoeschel force-pushed the topic-mpiBenchmark branch 2 times, most recently from 1ba8b5d to 53129c6 Compare October 7, 2018 14:42
@franzpoeschel franzpoeschel force-pushed the topic-mpiBenchmark branch 3 times, most recently from 4ffe131 to b3525a1 Compare October 29, 2018 16:20
:maxdepth: 1
:hidden:

/utilities/benchmark.rst No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not need an initial /

src/Datatype.cpp Outdated
os << dt;
return buf.str();
}
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing single newline before EOF


#endif
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one newline too much ;)


};

} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline before EOF

};
}
#endif

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one newline too much ;)

}

#endif

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one newline too much ;)

src/backend/PatchRecordComponent.cpp
src/backend/Writable.cpp)
src/backend/Writable.cpp
src/benchmark/mpi/OneDimensionalBlockSlicer.cpp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that this file and mpi_benchmark.cpp should be just in an extra or example target list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added mpi_benchmark.cpp (now 8_mpi_benchmark.cpp) to the example target list.
For OneDimensionalBlockSlicer.cpp do you mean to create a new list for that?

Copy link
Member

@ax3l ax3l Nov 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this .cpp file is not part of the library's CORE_SOURCE but of the examples/apps only.

}

MPI_Finalize();
} No newline at end of file

This comment was marked as resolved.

@franzpoeschel franzpoeschel force-pushed the topic-mpiBenchmark branch 4 times, most recently from c54507c to 58315a1 Compare November 7, 2018 14:06
Implementation for slicing a hypercube along one dimension

Refactor MPI benchmarking

Dataset filling is now implemented by an own class instead of a virtual
function.

Add the fundaments for a write benchmark

Adapted from https://openpmd-api.readthedocs.io/en/latest/usage/parallel.html#writing

Nearly complete, but untested MPI benchmark

Missing the collection of benchmarking results for the single threads

Basically executable version of the benchmark

Better handling of dataset indexing

Do not set a compression when the compression string is empty

Fix index calculation

Create the write data anew for every iteration

This allows for bigger benchmarks since only final memory is needed, but
the time for data creation needs to be measured and deducted in the end.
Also document the code.

Refactor the creation of a DataSet

Forward constructor arguments to the DatasetFiller

Add some documentation and cleanup

Flush the Series after every iteration in the benchmark

Integrate with the build system

Allow compiling without MPI enabled

Also fix some shadowed variables

Refactor the benchmark

Make BlockSlicer and DatasetFiller abstract classes instead of
templates.
Add configuration options for backends and numbers of threads to use.
Make it possible to actually include the benchmark.

Refactor benchmark to allow for several datatypes in one run

Make the benchmark system more flexible

Includes setting the number of iterations per benchmark configuration
and adding an adaptor class template SimpleDatasetFillerProvider lifting
a DatasetFiller to a DatasetFillerProvider.

Add documentation for the benchmark

Includes an example usage.
"resolve MPI misbehaviour" = "realized that I had a faulty installation"
@franzpoeschel franzpoeschel force-pushed the topic-mpiBenchmark branch 3 times, most recently from 0354bec to ed1fa9c Compare November 14, 2018 14:50
Add licensing information.
Fix whitespaces.
Add the MPI Benchmark example from the documentations to the examples to
be built during openMPI building.
* openPMD type.
*/

#if _MSC_VER && !__INTEL_COMPILER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please place this macro block above the doxygen block (separated by an empty newline)

@ax3l
Copy link
Member

ax3l commented Nov 30, 2018

I can merge this for now, thanks a lot!

@ax3l ax3l merged commit 7f6b29c into openPMD:dev Nov 30, 2018
@ax3l ax3l mentioned this pull request Nov 30, 2018
@ax3l
Copy link
Member

ax3l commented Dec 13, 2018

@franzpoeschel in CI, we get sporadically the error

what():  Internal error: Failed to create directories during ADIOS file creation

in the MPI benchmark. Can you confirm and might there be a quirk we need to fix?

@franzpoeschel
Copy link
Contributor Author

I have seen this error already, yes. I thought it was an issue with the ADIOS backend, I will try finding the cause of it.

@ax3l ax3l mentioned this pull request Dec 13, 2018
@franzpoeschel
Copy link
Contributor Author

Just to be sure, #418 is exactly this issue, right?

@ax3l
Copy link
Member

ax3l commented Jan 9, 2019

yes, #418 and #421 were sporadic CI issues with parallel I/O :)

@franzpoeschel franzpoeschel deleted the topic-mpiBenchmark branch January 28, 2021 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants