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

restored PMI_Get_nid since gethostid does not work on ANL Polaris #355

Merged
merged 1 commit into from
Oct 16, 2024
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ set (USE_MALLOC 0)
if(ENABLE_PROFILING)
set (GA_PROFILING 1)
endif()
if(USE_CRAYSHASTA)
set(__CRAYXE 1)
# list(APPEND GA_EXTRA_LIBS pmi2)
endif()

# hardwire ARMCI configuration options
set (HAVE_ARMCI_GROUP_COMM 1)
Expand Down
10 changes: 10 additions & 0 deletions cmx/src-mpi-pr/groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include <mpi.h>

#if defined(__CRAYXE)
# include <pmi.h>
#endif

#include "cmx.h"
#include "cmx_impl.h"
#include "groups.h"
Expand Down Expand Up @@ -589,6 +593,12 @@ void cmx_group_finalize()

static long xgethostid()
{
#if defined(__CRAYXE)
#warning CRAY
int nodeid;
PMI_Get_nid(g_state.rank, &nodeid);
#else
long nodeid = gethostid();
#endif
return nodeid;
}
1 change: 1 addition & 0 deletions comex/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#cmakedefine01 HAVE_SYS_WEAK_ALIAS_PRAGMA

#cmakedefine NDEBUG
#cmakedefine __CRAYXE

#cmakedefine01 ENABLE_SYSV

Expand Down
11 changes: 11 additions & 0 deletions comex/src-mpi-mt/groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#include <mpi.h>

#if defined(__CRAYXE)
# include <pmi.h>
#endif

#include "comex.h"
#include "comex_impl.h"
#include "groups.h"
Expand Down Expand Up @@ -462,6 +466,13 @@ void comex_group_finalize()

static long xgethostid()
{
#if defined(__CRAYXE)
#warning CRAY
int nodeid;
PMI_Get_nid(g_state.rank, &nodeid);
#else
long nodeid = gethostid();
#endif

return nodeid;
}
11 changes: 11 additions & 0 deletions comex/src-mpi-pr/groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

#include <mpi.h>

#if defined(__CRAYXE)
# include <pmi.h>
#endif

#include "comex.h"
#include "comex_impl.h"
#include "groups.h"
Expand Down Expand Up @@ -613,6 +617,13 @@ void comex_group_finalize()

static long xgethostid()
{
#if defined(__CRAYXE)
#warning CRAY
int nodeid;
PMI_Get_nid(g_state.rank, &nodeid);
#else
long nodeid = gethostid();
#endif

return nodeid;
}
11 changes: 11 additions & 0 deletions comex/src-mpi-pt/groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#include <mpi.h>

#if defined(__CRAYXE)
# include <pmi.h>
#endif

#include "comex.h"
#include "comex_impl.h"
#include "groups.h"
Expand Down Expand Up @@ -498,6 +502,13 @@ void comex_group_finalize()

static long xgethostid()
{
#if defined(__CRAYXE)
#warning CRAY
int nodeid;
PMI_Get_nid(g_state.rank, &nodeid);
#else
long nodeid = gethostid();
#endif

return nodeid;
}