Skip to content

Commit

Permalink
communicator update (#105)
Browse files Browse the repository at this point in the history
* communicator update

* missing support complex
  • Loading branch information
ntrost57 authored Jul 14, 2022
1 parent 4780aa2 commit f610c52
Show file tree
Hide file tree
Showing 4 changed files with 473 additions and 113 deletions.
42 changes: 21 additions & 21 deletions src/base/global_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -289,9 +289,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -392,9 +392,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -493,9 +493,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -559,9 +559,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -625,9 +625,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -692,9 +692,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -760,9 +760,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -1273,9 +1273,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -1398,9 +1398,9 @@ namespace rocalution
IndexType2 nnz_local;
IndexType2 nnz_ghost;

communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_interior_.GetNnz(), &nnz_local, this->pm_->comm_);
communication_allreduce_single_sum(
communication_sync_allreduce_single_sum(
this->matrix_ghost_.GetNnz(), &nnz_ghost, this->pm_->comm_);

this->nnz_ = nnz_local + nnz_ghost;
Expand Down Expand Up @@ -1813,7 +1813,7 @@ namespace rocalution

// Get the global size
int global_size;
communication_allreduce_single_sum(nrow, &global_size, this->pm_->comm_);
communication_sync_allreduce_single_sum(nrow, &global_size, this->pm_->comm_);
pm->SetGlobalNrow(global_size);
pm->SetGlobalNcol(global_size);

Expand Down
8 changes: 4 additions & 4 deletions src/base/global_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ namespace rocalution
ValueType global;

#ifdef SUPPORT_MULTINODE
communication_allreduce_single_sum(local, &global, this->pm_->comm_);
communication_sync_allreduce_single_sum(local, &global, this->pm_->comm_);
#else
global = local;
#endif
Expand All @@ -585,7 +585,7 @@ namespace rocalution
ValueType global;

#ifdef SUPPORT_MULTINODE
communication_allreduce_single_sum(local, &global, this->pm_->comm_);
communication_sync_allreduce_single_sum(local, &global, this->pm_->comm_);
#else
global = local;
#endif
Expand All @@ -611,7 +611,7 @@ namespace rocalution
ValueType global;

#ifdef SUPPORT_MULTINODE
communication_allreduce_single_sum(local, &global, this->pm_->comm_);
communication_sync_allreduce_single_sum(local, &global, this->pm_->comm_);
#else
global = local;
#endif
Expand All @@ -628,7 +628,7 @@ namespace rocalution
ValueType global;

#ifdef SUPPORT_MULTINODE
communication_allreduce_single_sum(local, &global, this->pm_->comm_);
communication_sync_allreduce_single_sum(local, &global, this->pm_->comm_);
#else
global = local;
#endif
Expand Down
Loading

0 comments on commit f610c52

Please sign in to comment.