Skip to content
Snippets Groups Projects

Feature/amalgamated

Closed Stephan Schulz requested to merge feature/amalgamated into refactor
1 file
+ 10
10
Compare changes
  • Side-by-side
  • Inline
+ 10
10
@@ -220,12 +220,12 @@ template <class T, class W> void Unstructured_LB<T, W>::setup() {
@@ -220,12 +220,12 @@ template <class T, class W> void Unstructured_LB<T, W>::setup() {
MPI_Cart_rank(this->globalComm, this->local_coords.data(), &this->localRank);
MPI_Cart_rank(this->globalComm, this->local_coords.data(), &this->localRank);
// groups required for new communicators
// groups required for new communicators
MPI_Group groups[n_vertices];
MPI_Group known_unused groups[n_vertices];
// arrays of processes belonging to group
// arrays of processes belonging to group
int processes[n_vertices][n_vertices];
int known_unused processes[n_vertices][n_vertices];
// shifted local coordinates to find neighboring processes
// shifted local coordinates to find neighboring processes
int shifted_coords[this->dimension];
int known_unused shifted_coords[this->dimension];
// get main and secondary dimensions
// get main and secondary dimensions
if (this->global_dims.at(2) >= this->global_dims.at(1)) {
if (this->global_dims.at(2) >= this->global_dims.at(1)) {
@@ -293,8 +293,8 @@ template <class T, class W> void Unstructured_LB<T, W>::setup() {
@@ -293,8 +293,8 @@ template <class T, class W> void Unstructured_LB<T, W>::setup() {
#endif
#endif
std::vector<int> dim_vert(this->global_dims);
std::vector<int> dim_vert(this->global_dims);
MPI_Comm tmp_comm;
MPI_Comm known_unused tmp_comm;
int own_vertex;
int known_unused own_vertex;
#ifdef ALL_DEBUG_ENABLED
#ifdef ALL_DEBUG_ENABLED
MPI_Barrier(this->globalComm);
MPI_Barrier(this->globalComm);
@@ -403,7 +403,7 @@ void Unstructured_LB<T, W>::balance(int /*step*/) {
@@ -403,7 +403,7 @@ void Unstructured_LB<T, W>::balance(int /*step*/) {
T center[this->dimension];
T center[this->dimension];
// local geometric center
// local geometric center
T local_info[(this->dimension + 2) * n_vertices];
T known_unused local_info[(this->dimension + 2) * n_vertices];
for (int i = 0; i < n_vertices * n_vertices * (this->dimension + 2); ++i)
for (int i = 0; i < n_vertices * n_vertices * (this->dimension + 2); ++i)
vertex_info[i] = -1;
vertex_info[i] = -1;
@@ -517,12 +517,12 @@ void Unstructured_LB<T, W>::balance(int /*step*/) {
@@ -517,12 +517,12 @@ void Unstructured_LB<T, W>::balance(int /*step*/) {
break;
break;
}
}
// exchange information with all vertex neighbors
// exchange information with all vertex neighbors
MPI_Request request[n_vertices];
MPI_Request known_unused request[n_vertices];
MPI_Status status[n_vertices];
MPI_Status known_unused status[n_vertices];
// compute new position for vertex 7 (if not periodic)
// compute new position for vertex 7 (if not periodic)
T total_work = (T)0;
T known_unused total_work = (T)0;
T shift_vectors[this->dimension * n_vertices];
T known_unused shift_vectors[this->dimension * n_vertices];
for (int v = 0; v < n_vertices; ++v) {
for (int v = 0; v < n_vertices; ++v) {
for (int d = 0; d < this->dimension; ++d) {
for (int d = 0; d < this->dimension; ++d) {
Loading