Skip to content

Commit

Permalink
edit: rename MY_MPI_UWORD
Browse files Browse the repository at this point in the history
  • Loading branch information
HPDell committed Jul 14, 2024
1 parent 6ebc89c commit 05e685b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/gwmodelpp/utils/armampi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include "mpi.h"

#ifdef ARMA_32BIT_WORD
#define MY_MPI_UWORD MPI_UNSIGNED_LONG
#define GWM_MPI_UWORD MPI_UNSIGNED_LONG
#else // ARMA_32BIT_WORD
#define MY_MPI_UWORD MPI_UNSIGNED_LONG_LONG
#define GWM_MPI_UWORD MPI_UNSIGNED_LONG_LONG
#endif // ARMA_32BIT_WORD

void mat_mul_mpi(arma::mat& a, arma::mat& b, arma::mat& c, const int ip, const int np, const size_t range);
2 changes: 1 addition & 1 deletion src/gwmodelpp/GWRBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mat GWRBasic::fit()
aShape[3] = mWorkRangeSize;
// cout << mWorkerId << " process send size: [" << aShape[0] << "," << aShape[1] << "," << aShape[2] << "," << aShape[3] << "]\n";
}
MPI_Bcast(aShape, 4, MY_MPI_UWORD, 0, MPI_COMM_WORLD);
MPI_Bcast(aShape, 4, GWM_MPI_UWORD, 0, MPI_COMM_WORLD);
if (mWorkerId > 0) // slave process
{
// cout << mWorkerId << " process recv size: [" << aShape[0] << "," << aShape[1] << "," << aShape[2] << "," << aShape[3] << "]\n";
Expand Down
6 changes: 3 additions & 3 deletions src/gwmodelpp/GWRMultiscale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ mat GWRMultiscale::fit()
aShape[2] = nDim;
aShape[3] = mWorkRangeSize;
}
MPI_Bcast(aShape, 4, MY_MPI_UWORD, 0, MPI_COMM_WORLD);
MPI_Bcast(aShape, 4, GWM_MPI_UWORD, 0, MPI_COMM_WORLD);
if (mWorkerId > 0) // slave process
{
nDp = aShape[0];
Expand Down Expand Up @@ -975,7 +975,7 @@ double GWRMultiscale::bandwidthSizeCriterionVarCVMpi(BandwidthWeight* bandwidthW
{
status = 0;
}
MPI_Allgather(&status, 1, MY_MPI_UWORD, status_all.memptr(), 1, MY_MPI_UWORD, MPI_COMM_WORLD);
MPI_Allgather(&status, 1, GWM_MPI_UWORD, status_all.memptr(), 1, GWM_MPI_UWORD, MPI_COMM_WORLD);
if (!all(status_all))
return DBL_MAX;

Expand Down Expand Up @@ -1015,7 +1015,7 @@ double GWRMultiscale::bandwidthSizeCriterionVarAICMpi(BandwidthWeight* bandwidth
{
status = 0;
}
MPI_Allgather(&status, 1, MY_MPI_UWORD, status_all.memptr(), 1, MY_MPI_UWORD, MPI_COMM_WORLD);
MPI_Allgather(&status, 1, GWM_MPI_UWORD, status_all.memptr(), 1, GWM_MPI_UWORD, MPI_COMM_WORLD);
if (!all(status_all))
return DBL_MAX;

Expand Down

0 comments on commit 05e685b

Please sign in to comment.