Skip to content

Commit

Permalink
Change MPI block size and minor SYCL document update
Browse files Browse the repository at this point in the history
  • Loading branch information
do-jason committed Nov 1, 2023
1 parent da8ee23 commit 1343fa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion README_sycl.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ $ cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-O3" \
-DCMAKE_CXX_FLAGS="-O3 -march=native" \
-DCMAKE_EXE_LINKER_FLAGS="-O3 -march=native" \
..

$ #### This is Intel GPU Level Zero backend specific #####
Expand Down
9 changes: 5 additions & 4 deletions src/mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ MpiNode::MpiNode(int &argc, char ** argv)
MPI_Comm_create_group(MPI_COMM_WORLD, root_evenG, 1, &root_evenC);
MPI_Comm_create_group(MPI_COMM_WORLD, root_oddG, 2, &root_oddC);

constexpr std::ptrdiff_t defBlock = RELION_MPI_MAX_SIZE; // default for MPI communication
constexpr std::ptrdiff_t defPtBlock = 4ULL*1024*1024*1024; // 4 GiB, default for MPI communication
constexpr std::ptrdiff_t defColBlock = 64*1024*1024; // 64 MiB, default for MPI communication
constexpr std::ptrdiff_t maxPtBlock = 8ULL*1024*1024*1024; // 8 GiB, max for MPI pt-2-pt. Normal limit is sizeof(variable) * INT_MAX bytes
constexpr std::ptrdiff_t maxCollBlock = 4ULL*1024*1024*1024; // 4 GiB, max for MPI collective. Normal limit is sizeof(variable) * INT_MAX bytes
constexpr std::ptrdiff_t maxCollBlock = 1ULL*1024*1024*1024; // 1 GiB, max for MPI collective. Normal limit is sizeof(variable) * INT_MAX bytes

// User input to change default MPI communication blocking size
char* pEnvBlock = std::getenv("MAX_MPI_BLOCK"); // For both pt-2-pt and collective
Expand Down Expand Up @@ -144,7 +145,7 @@ MpiNode::MpiNode(int &argc, char ** argv)
p2p_blocksize = maxPtBlock;
}
else
p2p_blocksize = defBlock;
p2p_blocksize = defPtBlock;

if (lColl > 0) // "MAX_MPI_COLL_BLOCK" is set
{
Expand All @@ -154,7 +155,7 @@ MpiNode::MpiNode(int &argc, char ** argv)
coll_blocksize = maxCollBlock;
}
else
coll_blocksize = defBlock;
coll_blocksize = defColBlock;
}
// Make it multiple of 8 bytes
p2p_blocksize = (p2p_blocksize / 8ULL) * 8ULL;
Expand Down

0 comments on commit 1343fa3

Please sign in to comment.