Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/common.cu
Original file line number Diff line number Diff line change
Expand Up @@ -860,13 +860,18 @@ testResult_t run() {
if (hostHashs[p] == hostHashs[proc]) localRank++;
}

MPI_Comm mpi_comm = MPI_COMM_WORLD;
char* str = getenv("NCCL_TESTS_SPLIT_MASK");
uint64_t mask = str ? strtoul(str, NULL, 16) : 0;
MPI_Comm mpi_comm;
color = proc & mask;
MPI_Comm_split(MPI_COMM_WORLD, color, proc, &mpi_comm);
MPI_Comm_size(mpi_comm, &ncclProcs);
MPI_Comm_rank(mpi_comm, &ncclProc);
if (str) {
uint64_t mask = strtoul(str, NULL, 16);
color = proc & mask;
MPI_Comm_split(MPI_COMM_WORLD, color, proc, &mpi_comm);
MPI_Comm_size(mpi_comm, &ncclProcs);
MPI_Comm_rank(mpi_comm, &ncclProc);
} else {
ncclProcs = totalProcs;
ncclProc = proc;
}
#endif
is_main_thread = is_main_proc = (proc == 0) ? 1 : 0;

Expand Down