From 0a94368118e37caf1af43f83b9465161b734c83f Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Fri, 26 Jul 2024 14:46:14 -0700 Subject: [PATCH] remove Myrinet GM --- armci/README | 3 +-- armci/src/common/armci.c | 6 ++---- armci/src/common/ds-shared.c | 21 ++++----------------- armci/src/common/request.c | 14 +++++--------- armci/src/include/armcip.h | 6 +----- armci/src/include/copy.h | 7 +------ armci/src/include/request.h | 4 +--- armci/src/locks/mutex.c | 4 ---- armci/src/memory/shmem.c | 3 +-- armci/src/progress/fence.c | 2 +- m4/armci_setup.m4 | 8 -------- 11 files changed, 17 insertions(+), 61 deletions(-) diff --git a/armci/README b/armci/README index 461759c83..53edc36db 100644 --- a/armci/README +++ b/armci/README @@ -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 ------------------------ diff --git a/armci/src/common/armci.c b/armci/src/common/armci.c index b9f03fb7d..9d1544fea 100644 --- a/armci/src/common/armci.c +++ b/armci/src/common/armci.c @@ -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(); @@ -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; diff --git a/armci/src/common/ds-shared.c b/armci/src/common/ds-shared.c index 66b1374e5..eea897576 100644 --- a/armci/src/common/ds-shared.c +++ b/armci/src/common/ds-shared.c @@ -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 @@ -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 @@ -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, @@ -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 *); @@ -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); @@ -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); @@ -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(); diff --git a/armci/src/common/request.c b/armci/src/common/request.c index dc1fa6043..35dafab8f 100644 --- a/armci/src/common/request.c +++ b/armci/src/common/request.c @@ -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; @@ -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]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?", @@ -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 diff --git a/armci/src/include/armcip.h b/armci/src/include/armcip.h index 993caade3..7a6a26722 100644 --- a/armci/src/include/armcip.h +++ b/armci/src/include/armcip.h @@ -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 diff --git a/armci/src/include/copy.h b/armci/src/include/copy.h index 0bf044780..e894a932b 100644 --- a/armci/src/include/copy.h +++ b/armci/src/include/copy.h @@ -198,12 +198,7 @@ if(((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 diff --git a/armci/src/include/request.h b/armci/src/include/request.h index da39b066e..469f19bd1 100644 --- a/armci/src/include/request.h +++ b/armci/src/include/request.h @@ -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" diff --git a/armci/src/locks/mutex.c b/armci/src/locks/mutex.c index 75a265bb4..ad1de34f2 100644 --- a/armci/src/locks/mutex.c +++ b/armci/src/locks/mutex.c @@ -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; diff --git a/armci/src/memory/shmem.c b/armci/src/memory/shmem.c index a74df62ee..cbf4f6f2d 100644 --- a/armci/src/memory/shmem.c +++ b/armci/src/memory/shmem.c @@ -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) diff --git a/armci/src/progress/fence.c b/armci/src/progress/fence.c index d90f9adb4..c3057e962 100644 --- a/armci/src/progress/fence.c +++ b/armci/src/progress/fence.c @@ -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); diff --git a/m4/armci_setup.m4 b/m4/armci_setup.m4 index 03bbdc0e6..a59807bfa 100644 --- a/m4/armci_setup.m4 +++ b/m4/armci_setup.m4 @@ -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])