Skip to content

Commit 8d46102

Browse files
authored
Merge pull request #6028 from ye-luo/remove-mpi-return
Remove unused return value of MPI calls.
2 parents e2fd8e3 + 5c6eae9 commit 8d46102

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

src/Message/CommOperatorsMPI.h

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ inline void Communicate::gatherv(std::vector<char>& l,
786786
std::vector<int>& displ,
787787
int dest)
788788
{
789-
int ierr = MPI_Gatherv(l.data(), l.size(), MPI_CHAR, g.data(), counts.data(), displ.data(), MPI_CHAR, dest, myMPI);
789+
MPI_Gatherv(l.data(), l.size(), MPI_CHAR, g.data(), counts.data(), displ.data(), MPI_CHAR, dest, myMPI);
790790
}
791791

792792

@@ -797,8 +797,7 @@ inline void Communicate::gatherv(std::vector<double>& l,
797797
std::vector<int>& displ,
798798
int dest)
799799
{
800-
int ierr =
801-
MPI_Gatherv(l.data(), l.size(), MPI_DOUBLE, g.data(), counts.data(), displ.data(), MPI_DOUBLE, dest, myMPI);
800+
MPI_Gatherv(l.data(), l.size(), MPI_DOUBLE, g.data(), counts.data(), displ.data(), MPI_DOUBLE, dest, myMPI);
802801
}
803802

804803
template<>
@@ -808,7 +807,7 @@ inline void Communicate::gatherv(std::vector<float>& l,
808807
std::vector<int>& displ,
809808
int dest)
810809
{
811-
int ierr = MPI_Gatherv(l.data(), l.size(), MPI_FLOAT, g.data(), counts.data(), displ.data(), MPI_FLOAT, dest, myMPI);
810+
MPI_Gatherv(l.data(), l.size(), MPI_FLOAT, g.data(), counts.data(), displ.data(), MPI_FLOAT, dest, myMPI);
812811
}
813812

814813
template<>
@@ -818,7 +817,7 @@ inline void Communicate::gatherv(std::vector<int>& l,
818817
std::vector<int>& displ,
819818
int dest)
820819
{
821-
int ierr = MPI_Gatherv(l.data(), l.size(), MPI_INT, g.data(), counts.data(), displ.data(), MPI_INT, dest, myMPI);
820+
MPI_Gatherv(l.data(), l.size(), MPI_INT, g.data(), counts.data(), displ.data(), MPI_INT, dest, myMPI);
822821
}
823822

824823
template<>
@@ -840,7 +839,7 @@ inline void Communicate::allgatherv(std::vector<int>& l,
840839
std::vector<int>& counts,
841840
std::vector<int>& displ)
842841
{
843-
int ierr = MPI_Allgatherv(l.data(), l.size(), MPI_INT, g.data(), counts.data(), displ.data(), MPI_INT, myMPI);
842+
MPI_Allgatherv(l.data(), l.size(), MPI_INT, g.data(), counts.data(), displ.data(), MPI_INT, myMPI);
844843
}
845844

846845
template<>
@@ -850,25 +849,25 @@ inline void Communicate::gatherv(std::vector<long>& l,
850849
std::vector<int>& displ,
851850
int dest)
852851
{
853-
int ierr = MPI_Gatherv(l.data(), l.size(), MPI_LONG, g.data(), counts.data(), displ.data(), MPI_LONG, dest, myMPI);
852+
MPI_Gatherv(l.data(), l.size(), MPI_LONG, g.data(), counts.data(), displ.data(), MPI_LONG, dest, myMPI);
854853
}
855854

856855
template<>
857856
inline void Communicate::gather(std::vector<double>& l, std::vector<double>& g, int dest)
858857
{
859-
int ierr = MPI_Gather(l.data(), l.size(), MPI_DOUBLE, g.data(), l.size(), MPI_DOUBLE, dest, myMPI);
858+
MPI_Gather(l.data(), l.size(), MPI_DOUBLE, g.data(), l.size(), MPI_DOUBLE, dest, myMPI);
860859
}
861860

862861
template<>
863862
inline void Communicate::gather(std::vector<char>& l, std::vector<char>& g, int dest)
864863
{
865-
int ierr = MPI_Gather(l.data(), l.size(), MPI_CHAR, g.data(), l.size(), MPI_CHAR, dest, myMPI);
864+
MPI_Gather(l.data(), l.size(), MPI_CHAR, g.data(), l.size(), MPI_CHAR, dest, myMPI);
866865
}
867866

868867
template<>
869868
inline void Communicate::gather(std::vector<int>& l, std::vector<int>& g, int dest)
870869
{
871-
int ierr = MPI_Gather(l.data(), l.size(), MPI_INT, g.data(), l.size(), MPI_INT, dest, myMPI);
870+
MPI_Gather(l.data(), l.size(), MPI_INT, g.data(), l.size(), MPI_INT, dest, myMPI);
872871
}
873872

874873
template<>
@@ -878,14 +877,13 @@ inline void Communicate::gatherv(PooledData<double>& l,
878877
std::vector<int>& displ,
879878
int dest)
880879
{
881-
int ierr =
882-
MPI_Gatherv(l.data(), l.size(), MPI_DOUBLE, g.data(), counts.data(), displ.data(), MPI_DOUBLE, dest, myMPI);
880+
MPI_Gatherv(l.data(), l.size(), MPI_DOUBLE, g.data(), counts.data(), displ.data(), MPI_DOUBLE, dest, myMPI);
883881
}
884882

885883
template<>
886884
inline void Communicate::gather(PooledData<double>& l, PooledData<double>& g, int dest)
887885
{
888-
int ierr = MPI_Gather(l.data(), l.size(), MPI_DOUBLE, g.data(), l.size(), MPI_DOUBLE, dest, myMPI);
886+
MPI_Gather(l.data(), l.size(), MPI_DOUBLE, g.data(), l.size(), MPI_DOUBLE, dest, myMPI);
889887
}
890888

891889
template<>
@@ -923,7 +921,7 @@ inline void Communicate::gsum(std::vector<std::complex<double>>& g)
923921
template<>
924922
inline void Communicate::gatherv(char* l, char* g, int n, std::vector<int>& counts, std::vector<int>& displ, int dest)
925923
{
926-
int ierr = MPI_Gatherv(l, n, MPI_CHAR, g, counts.data(), displ.data(), MPI_CHAR, dest, myMPI);
924+
MPI_Gatherv(l, n, MPI_CHAR, g, counts.data(), displ.data(), MPI_CHAR, dest, myMPI);
927925
}
928926

929927
template<>
@@ -939,8 +937,7 @@ inline void Communicate::scatterv(std::vector<char>& sb,
939937
std::vector<int>& displ,
940938
int source)
941939
{
942-
int ierr =
943-
MPI_Scatterv(sb.data(), counts.data(), displ.data(), MPI_CHAR, rb.data(), rb.size(), MPI_CHAR, source, myMPI);
940+
MPI_Scatterv(sb.data(), counts.data(), displ.data(), MPI_CHAR, rb.data(), rb.size(), MPI_CHAR, source, myMPI);
944941
}
945942

946943
template<typename T, typename TMPI, typename IT>

0 commit comments

Comments
 (0)