Skip to content

Commit

Permalink
Add environment variable to control max win sent length
Browse files Browse the repository at this point in the history
  • Loading branch information
bichengying committed May 18, 2020
1 parent a62d785 commit eef339f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bluefog/common/mpi_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ namespace common {
// Due to unclear reason that mpi_put/get/accumlate under the
// mpi_lock epoch cannot send too long vector in one time, we
// define this number as the maximum size of win_ops can send.
constexpr int MAX_WIN_SENT = 2000;
static const char* BLUEFOG_MAX_WIN_SENT = std::getenv("BLUEFOG_MAX_WIN_SENT_LENGTH");
static const int MAX_WIN_SENT =
BLUEFOG_MAX_WIN_SENT == nullptr
? 2000
: std::strtol(BLUEFOG_MAX_WIN_SENT, nullptr, 10);

// MPIController
void MPIController::Initialize() {
Expand Down

0 comments on commit eef339f

Please sign in to comment.