Commit 5f9eafdd authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

better memory estimate

parent 642f8bae
......@@ -726,7 +726,6 @@ void IO::writeTemporaryResult(unsigned int idefocus, unsigned int iconf, ScanPoi
shared_ptr<memory::buffer::number_buffer<float>> &ibuf,
shared_ptr<memory::buffer::number_buffer<float>> &cbuf) {
auto &mpi_env = mpi::Environment::getInstance();
auto tmpfile = std::ofstream(getTempFileName(), std::ios::binary | std::ios::app);
// the format is as follows:
......
......@@ -124,6 +124,7 @@ namespace stemsalabim {
(gridman->energyLossGrid().size() + 2) *
p.numberOfThreads();
// results
unsigned long number_intensities_per_pixel = p.adf() ? (gridman->adfDetectorGrid().size() *
gridman->adfSliceCoords().size() *
......@@ -133,6 +134,9 @@ namespace stemsalabim {
gridman->cbedSliceCoords().size() *
gridman->energyLossGrid().size()) : 0;
// buffer arrays in calculatePixel
result_mem_per_proc += p.numberOfThreads() * (number_intensities_per_pixel + number_cbed_per_pixel) * fs;
// buffers at least!
result_mem_per_proc += p.workPackageSize() * (number_intensities_per_pixel + number_cbed_per_pixel) * fs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment