1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 04:37:05 +01:00

Solving a memory leak in Communicator_mpi

This commit is contained in:
Guido Cossu
2017-09-18 14:39:04 +01:00
parent b542d349b8
commit 999c623590
5 changed files with 135 additions and 99 deletions

View File

@ -50,6 +50,9 @@ public:
GridBase(const std::vector<int> & processor_grid) : CartesianCommunicator(processor_grid) {};
virtual ~GridBase() = default;
// Physics Grid information.
std::vector<int> _simd_layout;// Which dimensions get relayed out over simd lanes.
std::vector<int> _fdimensions;// (full) Global dimensions of array prior to cb removal

View File

@ -93,6 +93,7 @@ public:
// Use a reduced simd grid
_ldimensions[d] = _gdimensions[d] / _processors[d]; //local dimensions
//std::cout << _ldimensions[d] << " " << _gdimensions[d] << " " << _processors[d] << std::endl;
assert(_ldimensions[d] * _processors[d] == _gdimensions[d]);
_rdimensions[d] = _ldimensions[d] / _simd_layout[d]; //overdecomposition
@ -137,6 +138,8 @@ public:
block = block * _rdimensions[d];
}
};
virtual ~GridCartesian() = default;
};
}
#endif