Skip to content

Commit 936f87c

Browse files
authored
Merge (#1799): Remove mpi::communicator nullptr check.
`MPI_Comm` cannot be expected to be a pointer. Some MPI implementations may use a non-pointer type. Related PR: #1799
2 parents 858bbea + 06d5577 commit 936f87c

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

.github/_typos.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[files]
2-
extend-exclude = ["third_party/*", "*.svg"]
2+
extend-exclude = ["third_party/*", "*.svg", "*.bib", "CITING.md"]
33

44
[default.extend-words]
55
dout = "dout"

.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ build/cuda110/nompi/gcc/cuda/release/shared:
101101
variables:
102102
BUILD_OMP: "ON"
103103
BUILD_CUDA: "ON"
104+
BUILD_MPI: "OFF"
104105
BUILD_TYPE: "Release"
105106
FAST_TESTS: "ON"
106107
# fix gtest issue https://github.com/google/googletest/issues/3514

include/ginkgo/core/base/mpi.hpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,6 @@ class communicator {
567567
*/
568568
bool is_identical(const communicator& rhs) const
569569
{
570-
if (get() == nullptr || rhs.get() == nullptr) {
571-
return get() == rhs.get();
572-
}
573570
if (get() == MPI_COMM_NULL || rhs.get() == MPI_COMM_NULL) {
574571
return get() == rhs.get();
575572
}
@@ -592,9 +589,6 @@ class communicator {
592589
*/
593590
bool is_congruent(const communicator& rhs) const
594591
{
595-
if (!get() || !rhs.get()) {
596-
return get() == rhs.get();
597-
}
598592
if (get() == MPI_COMM_NULL || rhs.get() == MPI_COMM_NULL) {
599593
return get() == rhs.get();
600594
}
@@ -725,7 +719,7 @@ class communicator {
725719
* Broadcast data from calling process to all ranks in the communicator
726720
*
727721
* @param exec The executor, on which the message buffer is located.
728-
* @param buffer the buffer to broadcsat
722+
* @param buffer the buffer to broadcast
729723
* @param count the number of elements to broadcast
730724
* @param root_rank the rank to broadcast from
731725
*
@@ -748,7 +742,7 @@ class communicator {
748742
* communicator
749743
*
750744
* @param exec The executor, on which the message buffer is located.
751-
* @param buffer the buffer to broadcsat
745+
* @param buffer the buffer to broadcast
752746
* @param count the number of elements to broadcast
753747
* @param root_rank the rank to broadcast from
754748
*

0 commit comments

Comments
 (0)