Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change MPI block size and minor SYCL document update #1015

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
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
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
Loading