Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 181d99f2 authored by Philipp Samfaß's avatar Philipp Samfaß
Browse files

adapted rank mapping

parent 7b418034
......@@ -180,6 +180,21 @@ int mapTeamToWorldRank(int rank, int r) {
return rank + r * getTeamSize();
}
int translateRank(MPI_Comm srcComm, int srcRank, MPI_Comm destComm) {
MPI_Group srcCommGroup, destCommGroup;
int result;
MPI_Comm_group(srcComm, &srcCommGroup);
MPI_Comm_group(destComm, &destCommGroup);
MPI_Group_translate_ranks(srcCommGroup, 1, &srcRank, destCommGroup, &result);
return result;
}
int mapToWorldRank(int rank, MPI_Comm comm) {
return translateRank(rank, comm, MPI_COMM_WORLD);
}
void remapStatus(MPI_Status *status) {
if ((status != MPI_STATUS_IGNORE ) && (status != MPI_STATUSES_IGNORE )) {
status->MPI_SOURCE = mapWorldToTeamRank(status->MPI_SOURCE);
......
......@@ -84,6 +84,10 @@ int mapWorldToTeamRank(int rank);
int mapTeamToWorldRank(int rank, int r);
int translateRank(int srcRank, MPI_Comm srcComm, MPI_Comm destComm);
int mapToWorldRank(int rank, MPI_Comm comm);
/* Alters the MPI_SOURCE member of MPI_Status to 0 <= r < team size */
void remapStatus(MPI_Status *status);
......
......@@ -43,6 +43,16 @@ int MPI_Is_thread_main(int* flag) {
return MPI_SUCCESS;
}
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {
if(comm==MPI_COMM_WORLD)
#ifdef USE_MPI_OFFLOADING
PMPI_Comm_split(_comm, color, key, newcomm);
#else
PMPI_Comm_split(comm, color, key, newcomm);
#endif
return MPI_SUCCESS;
}
int MPI_Comm_rank(MPI_Comm comm, int *rank) {
// todo: assert that a team comm is used
//assert(comm == MPI_COMM_WORLD);
......@@ -221,17 +231,17 @@ int MPI_Iprobe_offload(int source, int tag, MPI_Comm comm, int *flag, MPI_Status
int MPI_Send_offload(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
#if COMMUNICATION_MODE==0
return ompi_send_offload_p2p(buf, count, datatype, mapTeamToWorldRank(dest, getTeam()), tag, comm);
return ompi_send_offload_p2p(buf, count, datatype, mapToWorldRank(dest, comm), tag, comm);
#elif COMMUNICATION_MODE==1
return ompi_send_offload_rma(buf, count, datatype, mapTeamToWorldRank(dest, getTeam()), tag, comm);
return ompi_send_offload_rma(buf, count, datatype, mapToWorldRank(dest, comm), tag, comm);
#endif
}
int MPI_Recv_offload(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status_Offload *stat) {
#if COMMUNICATION_MODE==0
return ompi_recv_offload_p2p(buf, count, datatype, mapTeamToWorldRank(source, getTeam()), tag, comm, stat);
return ompi_recv_offload_p2p(buf, count, datatype, mapToWorldRank(source, comm), tag, comm, stat);
#elif COMMUNICATION_MODE==1
return ompi_recv_offload_rma(buf, count, datatype, mapTeamToWorldRank(source, getTeam()), tag, comm, stat);
return ompi_recv_offload_rma(buf, count, datatype, mapToWorldRank(source, comm), tag, comm, stat);
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment