Skip to content

Commit

Permalink
remove Myrinet GM
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 26, 2024
1 parent 4aa1853 commit 0a94368
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 61 deletions.
3 changes: 1 addition & 2 deletions armci/README
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ specified.

SOCKETS is the assumed default for clusters connected with Ethernet. This
protocol might also work on other networks however, the performance might be
sub-optimal and on Myrinet it could even hang (GM does not work with fork and
the standard version of ARMCI uses fork).
sub-optimal.

Cross-Compilation Issues
------------------------
Expand Down
6 changes: 2 additions & 4 deletions armci/src/common/armci.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,14 @@ int _armci_init(MPI_Comm comm)
if(armci_nclus >1)
armci_start_server();
# endif
#if defined(GM) || defined(VAPI)
#if defined(VAPI)
/* initialize registration of memory */
armci_region_init();
#endif

armci_msg_barrier();
armci_init_memlock(); /* allocate data struct for locking memory areas */
#if !defined(GM)
armci_notify_init();
#endif
armci_msg_barrier();
armci_msg_gop_init();

Expand Down Expand Up @@ -710,7 +708,7 @@ char *ptr;
nb_handle = NULL;
}

#if defined(GM) || defined(VAPI)
#if defined(VAPI)
if(armci_rem_gpc(GET, darr, 2, &send, proc, 1, nb_handle))
#endif
return FAIL2;
Expand Down
21 changes: 4 additions & 17 deletions armci/src/common/ds-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ void armci_pipe_receive_strided(request_header_t* msginfo, void *ptr,
{
buf_arg_t arg;
int packsize = PACK_SIZE(msginfo->datalen);
#if defined(GM)
arg.buf_posted = msginfo->tag.data_ptr;
#endif

#if defined(VAPI)
arg.buf_posted = msginfo->tag;
#endif
Expand All @@ -137,9 +135,6 @@ void armci_pipe_send_strided(request_header_t *msginfo, void *buf, int buflen,
buf_arg_t arg;
int packsize = PACK_SIZE(msginfo->datalen);

#if defined(GM)
arg.buf_posted = msginfo->tag.data_ptr;
#endif
#if defined(VAPI)
arg.buf_posted = msginfo->tag;
#endif
Expand All @@ -151,15 +146,12 @@ int packsize = PACK_SIZE(msginfo->datalen);

armci_dispatch_strided(ptr, stride_arr, count, strides, -1, -1,
packsize, armcill_pipe_send_chunk, &arg);
#ifdef GM
armci_serv_send_nonblocking_complete(0);
#endif
}
#endif
/**************************** end of pipelining for medium size msg ***********/


#if defined(CLIENT_BUF_BYPASS) && !defined(GM)
#if defined(CLIENT_BUF_BYPASS)
/**************** NOTE: for now this code can only handle contiguous data *****/
void armci_send_strided_data_bypass(int proc, request_header_t *msginfo,
void *loc_buf, int msg_buflen,
Expand Down Expand Up @@ -767,7 +759,7 @@ void armci_send_data(request_header_t* msginfo, void *data)
{
int to = msginfo->from;

#if defined(GM) || defined(VAPI)
#if defined(VAPI)
/* if the data is in the pinned buffer: MessageRcvBuffer */
#if defined(PEND_BUFS)
extern int armci_data_in_serv_buf(void *);
Expand All @@ -780,10 +772,6 @@ void armci_send_data(request_header_t* msginfo, void *data)
armci_WriteToDirect(to, msginfo, data);
else {
/* copy the data to the MessageRcvBuffer */
#ifdef GM
/* leave space for header ack */
char *buf = MessageRcvBuffer + sizeof(long);
#else
char *buf = MessageRcvBuffer;
# if defined(PEND_BUFS)
fprintf(stderr, "%d:: op=%d len=%d ptr=%p working on unpinned memory. aborting!\n", armci_me, msginfo->operation,msginfo->datalen, data);
Expand All @@ -792,7 +780,6 @@ void armci_send_data(request_header_t* msginfo, void *data)
/* extern char *armci_openib_get_msg_rcv_buf(int); */
/* buf = armci_openib_get_msg_rcv_buf(msginfo->from); */
# endif
#endif
assert(buf != NULL);
armci_copy(data, buf, msginfo->datalen);
armci_WriteToDirect(to, msginfo, buf);
Expand Down Expand Up @@ -1069,7 +1056,7 @@ void armci_start_server()
void *armci_server_code(void *data)
{
#ifdef SERVER_THREAD
#if (defined(GM) || defined(VAPI)) && ARMCI_ENABLE_GPC_CALLS
#if (defined(VAPI)) && ARMCI_ENABLE_GPC_CALLS
# ifdef PTHREADS
extern pthread_t data_server;
data_server = pthread_self();
Expand Down
14 changes: 5 additions & 9 deletions armci/src/common/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern void armci_sock_send(int to, void *data, int len);
#endif


#if !defined(GM) && !defined(VAPI)
#if !defined(VAPI)
double _armci_rcv_buf[MSG_BUFLEN_DBL];
double _armci_snd_buf[MSG_BUFLEN_DBL];
char* MessageSndBuffer = (char*)_armci_snd_buf;
Expand Down Expand Up @@ -1296,14 +1296,10 @@ int armci_rem_get(int proc,
msginfo->bytes = msginfo->dscrlen;


#if defined(GM) || defined(VAPI)
#if defined(VAPI)
/* prepare for set the stamp at the end of the user buffer */
if(count[0]<sizeof(int))armci_die("armci_rem_get: wrong protocol",count[0]);
# ifdef GM
*(int*)(((char*)(dst_ptr)) + (count[0] -sizeof(int))) = ARMCI_GM_COMPLETE;
# else
*(int*)(((char*)(dst_ptr)) + (count[0] -sizeof(int))) = ARMCI_STAMP;
# endif
#endif

armci_send_req(proc,msginfo,bufsize);
Expand Down Expand Up @@ -1456,7 +1452,7 @@ void armci_server(request_header_t *msginfo, char *dscr, char* buf, int buflen)
armci_process_extheader(msginfo, dscr_save, buf, buflen);
}

#if ARMCI_ENABLE_GPC_CALLS && (defined(GM) || defined(VAPI) || defined(SOCKETS))
#if ARMCI_ENABLE_GPC_CALLS && (defined(VAPI) || defined(SOCKETS))
static int gpc_call_process( request_header_t *msginfo, int len,
char *dscr, char* buf, int buflen, char *sbuf);
#endif
Expand Down Expand Up @@ -1492,7 +1488,7 @@ void armci_server_vector( request_header_t *msginfo,
case GET:
/* fprintf(stderr, "%d:: Got a vector message!!\n", armci_me); */
if(msginfo->ehlen) {
#if ARMCI_ENABLE_GPC_CALLS && (defined(GM) || defined(VAPI))
#if ARMCI_ENABLE_GPC_CALLS && defined(VAPI)
gpc_call_process(msginfo, len, dscr, buf, buflen, sbuf);
#else
armci_die("Unexpected vector message with non-zero ehlen. GPC call?",
Expand Down Expand Up @@ -1571,7 +1567,7 @@ void armci_server_vector( request_header_t *msginfo,
/**Server side routine to handle a GPC call request**/
/*===============Register this memory=====================*/
#if ARMCI_ENABLE_GPC_CALLS
#if defined(GM) || defined(VAPI)
#if defined(VAPI)
gpc_buf_t *gpc_req;
#if defined(DATA_SERVER) && defined(SERVER_THREAD)
# ifdef PTHREADS
Expand Down
6 changes: 1 addition & 5 deletions armci/src/include/armcip.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,7 @@ extern void armci_finalize_fence();
if(!SAMECLUSNODE(proc_) && op_ != GET )FENCE_ARR(proc_)=1
# define UPDATE_FENCE_INFO(proc_) if(!SAMECLUSNODE(proc_))FENCE_ARR(proc_)=1
#else
# if defined(GM) && defined(ACK_FENCE)
# define ORDER(op,proc)
# else
# define ORDER(op,proc) if(proc != armci_me) FENCE_NODE(proc)
# endif
# define ORDER(op,proc) if(proc != armci_me) FENCE_NODE(proc)
# define UPDATE_FENCE_INFO(proc_)
#endif

Expand Down
7 changes: 1 addition & 6 deletions armci/src/include/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,7 @@
if(((p)<armci_clus_first)||((p)>armci_clus_last))shmem_quiet(); }
# define UPDATE_FENCE_STATE(p, op, nissued) if((op)==PUT) cmpl_proc=(p);
#else
# if defined(GM) && defined(ACK_FENCE)
extern void armci_gm_fence(int p);
# define FENCE_NODE(p) armci_gm_fence(p)
# else
# define FENCE_NODE(p)
# endif
# define FENCE_NODE(p)
# define UPDATE_FENCE_STATE(p, op, nissued)

#endif
Expand Down
4 changes: 1 addition & 3 deletions armci/src/include/request.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ extern INLINE int _armci_buf_cmpld(int bufid);
extern INLINE void _armci_buf_set_cmpld(void *buf, int state);
extern INLINE void _armci_buf_set_cmpld_idx(int idx, int state);

#if defined(GM)
# include "myrinet.h"
#elif defined(VAPI)
#if defined(VAPI)
# include "armci-vapi.h"
#elif defined(SOCKETS)
# include "sockets.h"
Expand Down
4 changes: 0 additions & 4 deletions armci/src/locks/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#define MAX_LOCKS 32768
#define SPINMAX 1000

#if defined(GM)
# define SERVER_LOCK
#endif

double _dummy_work_=0.;
static int num_mutexes=0, *tickets;

Expand Down
3 changes: 1 addition & 2 deletions armci/src/memory/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
* case b) search w/o forking until success (less accurate)
*/

/* under Myrinet GM, we cannot fork */
#if defined(GM) || defined(VAPI)
#if defined(VAPI)
# define SHMMAX_SEARCH_NO_FORK
#endif
#if defined(AIX) || defined(SHMMAX_SEARCH_NO_FORK)
Expand Down
2 changes: 1 addition & 1 deletion armci/src/progress/fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void armci_finalize_fence()

void PARMCI_Fence(int proc)
{
#if defined(DATA_SERVER) && !(defined(GM) && defined(ACK_FENCE))
#if defined(DATA_SERVER)
if(FENCE_ARR(proc) && (armci_nclus >1)){

int cluster = armci_clus_id(proc);
Expand Down
8 changes: 0 additions & 8 deletions m4/armci_setup.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ AS_CASE([$ga_armci_network],
AC_DEFINE([CRAY_XT], [1], [TODO])
AC_DEFINE([CRAY_SHMEM], [1], [TODO])
],
[GM], [
AC_DEFINE([PTHREADS], [1], [TODO])
AC_DEFINE([DATA_SERVER], [1], [TODO])
AC_DEFINE([ALLOW_PIN], [1], [TODO])
AC_DEFINE([SERVER_THREAD], [1], [TODO])
AC_DEFINE([_REENTRANT], [1], [TODO])
AC_DEFINE([GM], [1], [TODO])
],
[MPI_TS], [
AC_DEFINE([PTHREADS], [1], [TODO])
AC_DEFINE([DATA_SERVER], [1], [TODO])
Expand Down

0 comments on commit 0a94368

Please sign in to comment.