Skip to content

Commit

Permalink
remove cca and deprecated interconnects VIA, Quadrics Elan-3, Elan-4
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 26, 2024
1 parent 248c042 commit 6ce0fb1
Show file tree
Hide file tree
Showing 50 changed files with 44 additions and 8,534 deletions.
64 changes: 2 additions & 62 deletions armci/src/common/armci.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ void ARMCI_Error(char *msg, int code)

void armci_allocate_locks()
{
/* note that if ELAN_ACC is defined the scope of locks is limited to SMP */
#if !defined(CRAY_SHMEM) && \
( defined(HITACHI) || defined(CATAMOUNT) || \
(defined(QUADRICS) && defined(_ELAN_LOCK_H) && !defined(ELAN_ACC)) )
( defined(HITACHI) || defined(CATAMOUNT) )
armcill_allocate_locks(NUM_LOCKS);
#elif (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(HITACHI)
if(armci_nproc == 1)return;
Expand Down Expand Up @@ -248,25 +246,6 @@ void armci_init_memlock()
armci_msg_barrier();
}


#if defined(SYSV) || defined(WIN32) || defined(MMAP)
# if defined(QUADRICS) && !defined(NO_SHM)
static void armci_check_shmmax()
{
long mylimit, limit;
mylimit = limit = (long) armci_max_region();
armci_msg_bcast_scope(SCOPE_MASTERS, &limit, sizeof(long), 0);
if(mylimit != limit){
printf("%d:Shared mem limit in ARMCI is %ld bytes on node %s vs %ld on %s\n",
armci_me,mylimit<<10,armci_clus_info[armci_clus_me].hostname,
limit<<10, armci_clus_info[0].hostname);
fflush(stdout); sleep(1);
armci_die("All nodes must have the same SHMMAX limit if NO_SHM is not defined",0);
}
}
# endif
#endif

extern void armci_region_shm_malloc(void *ptr_arr[], size_t bytes);

#ifdef ENABLE_CHECKPOINT
Expand Down Expand Up @@ -432,9 +411,6 @@ int _armci_init(MPI_Comm comm)
# endif
}

# if defined(QUADRICS) && !defined(NO_SHM)
if(armci_me == armci_master)armci_check_shmmax();
# endif
#endif

#ifdef REGION_ALLOC
Expand All @@ -447,42 +423,6 @@ int _armci_init(MPI_Comm comm)
}
#endif

#ifdef MULTI_CTX
/* this is a hack for the Elan-3 multi-tiled memory (qsnetlibs v 1.4.10)
* we need to allocate and then free memory to satisfy libelan requirements
* for symmetric memory addresses
*/
if(armci_nclus >1){
int segments, segsize, seg;
void **addr;
armci_nattach_preallocate_info(&segments, &segsize);

segsize -= 1024*1024; /* leave some for the K&RM headers */
if(armci_me!=armci_master)segsize=0; /* only one allocates mem on node*/

addr = (void*) malloc(segments*armci_nproc*sizeof(void*));
if(!addr)armci_die("armci_init:addr malloc failed",segments*armci_nproc);

for(seg=0; seg< segments; seg++) /* allocate segments */
if(PARMCI_Malloc(addr+armci_nproc*seg,segsize))
armci_die("problem in Elan-3 mem preallocation",seg);

for(seg=0; seg< segments; seg++) /* return to free pool */
if(armci_me==armci_master)
if(PARMCI_Free(*(addr+armci_nproc*seg+armci_me)))
armci_die("problem in Elan-3 mem preallocation - free stage",seg);
free(addr);

#if 0
if(armci_me==armci_master){
printf("%d:preallocated %d segments %d bytes each\n",armci_me,
segments, segsize); fflush(stdout);
}
#endif

}
#endif

/* allocate locks: we need to do it before server is started */
armci_allocate_locks();
armci_init_fence();
Expand Down Expand Up @@ -770,7 +710,7 @@ char *ptr;
nb_handle = NULL;
}

#if defined(GM) || defined(VAPI) || defined(QUADRICS)
#if defined(GM) || defined(VAPI)
if(armci_rem_gpc(GET, darr, 2, &send, proc, 1, nb_handle))
#endif
return FAIL2;
Expand Down
7 changes: 0 additions & 7 deletions armci/src/common/clusterinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@
* Must define NO_SHMMAX_SEARCH in shmem.c to prevent depleting shared memory
* due to a gready shmem request by the master process on cluster node 0.
*/
#if defined(DECOSF) && defined(QUADRICS)
# if !defined(REGION_ALLOC)
# define NO_SHMEM
extern int armci_enable_alpha_hack();
# endif
#else
# define armci_enable_alpha_hack() 1
#endif

#define DEBUG 0
#define MAX_HOSTNAME 80
Expand Down
22 changes: 7 additions & 15 deletions armci/src/common/ds-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int n;
n = len%PIPE_SHORT_ROUNDUP;
if(n)len += (PIPE_SHORT_ROUNDUP-n);
}
#if defined(VIA) || defined(VAPI)
#if defined(VAPI)
else if(len <25*PIPE_BUFSIZE){
len /=4;
n = len%PIPE_SHORT_ROUNDUP;
Expand All @@ -76,7 +76,7 @@ else if(len <41*PIPE_BUFSIZE){
}
#endif
else
#if defined(VIA) || defined(VAPI)
#if defined(VAPI)
len = 8*4096;
#elif defined(HITACHI)
len = 128*1024-128;
Expand Down Expand Up @@ -124,7 +124,7 @@ int packsize = PACK_SIZE(msginfo->datalen);
#if defined(GM)
arg.buf_posted = msginfo->tag.data_ptr;
#endif
#if (defined(VIA) && defined(VIA_USES_RDMA)) || defined(VAPI)
#if defined(VAPI)
arg.buf_posted = msginfo->tag;
#endif

Expand All @@ -146,7 +146,7 @@ int packsize = PACK_SIZE(msginfo->datalen);
#if defined(GM) || defined(HITACHI)
arg.buf_posted = msginfo->tag.data_ptr;
#endif
#if (defined(VIA) && defined(VIA_USES_RDMA)) || defined(VAPI)
#if defined(VAPI)
arg.buf_posted = msginfo->tag;
#endif

Expand Down Expand Up @@ -773,7 +773,7 @@ void armci_send_data(request_header_t* msginfo, void *data)
{
int to = msginfo->from;

#if defined(VIA) || defined(GM) || defined(VAPI)
#if defined(GM) || defined(VAPI)
/* if the data is in the pinned buffer: MessageRcvBuffer */
#if defined(PEND_BUFS)
extern int armci_data_in_serv_buf(void *);
Expand Down Expand Up @@ -804,15 +804,7 @@ void armci_send_data(request_header_t* msginfo, void *data)
armci_WriteToDirect(to, msginfo, buf);
}
#else
#ifdef DOELAN4
/*this is because WriteToDirect is a no-op in elan4.c so we have
* to do a put. This will not cause problems anywhere else in the
* code and this part on elan4 will only be invoked in a GPC
*/
PARMCI_Put(data,msginfo->tag.data_ptr,msginfo->datalen,to);
#else
armci_WriteToDirect(to, msginfo, data);
#endif
armci_WriteToDirect(to, msginfo, data);
#endif
}

Expand Down Expand Up @@ -1083,7 +1075,7 @@ void armci_start_server()
void *armci_server_code(void *data)
{
#ifdef SERVER_THREAD
#if (defined(GM) || defined(VAPI) || defined(QUADRICS)) && ARMCI_ENABLE_GPC_CALLS
#if (defined(GM) || defined(VAPI)) && ARMCI_ENABLE_GPC_CALLS
# ifdef PTHREADS
extern pthread_t data_server;
data_server = pthread_self();
Expand Down
5 changes: 1 addition & 4 deletions armci/src/common/noncont.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@

#ifdef NB_NONCONT

#if defined(QUADRICS)
typedef ELAN_EVENT *HTYPE;
#define SHMEM_HANDLE_SUPPORTED
#elif defined(CRAY_SHMEM)
#if defined(CRAY_SHMEM)
typedef void *HTYPE;
#else
typedef armci_ireq_t HTYPE;
Expand Down
2 changes: 1 addition & 1 deletion armci/src/common/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int armci_pack_strided(int op, void* scale, int proc,
# endif
#endif

#if (defined(GM_) || defined(VIA_) || defined(VAPI_))
#if (defined(GM_) || defined(VAPI_))
/*we cant assume that the entire available buffer will be used for data,
fact that the header and descriptor also go in the same buffer should be
considered while packing.
Expand Down
16 changes: 6 additions & 10 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(VIA) &&!defined(VAPI)
#if !defined(GM) && !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 @@ -1301,7 +1301,7 @@ int armci_rem_get(int proc,
msginfo->bytes = msginfo->dscrlen;


#if defined(GM) || defined(VAPI) || defined(QUADRICS)
#if defined(GM) || 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
Expand Down Expand Up @@ -1461,7 +1461,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(DOELAN4) || defined(SOCKETS))
#if ARMCI_ENABLE_GPC_CALLS && (defined(GM) || 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 @@ -1497,7 +1497,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) || defined(DOELAN4))
#if ARMCI_ENABLE_GPC_CALLS && (defined(GM) || 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 @@ -1576,13 +1576,9 @@ 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) || defined(QUADRICS)
#if defined(GM) || defined(VAPI)
gpc_buf_t *gpc_req;
/*VT: I made the change below because DATA_SERVER is not defined for elan4
*VT: This will only be invoked in case of GPC call and should not intefere
*VT: with any other call
*/
#if (defined(DOELAN4) || defined(DATA_SERVER)) && defined(SERVER_THREAD)
#if defined(DATA_SERVER) && defined(SERVER_THREAD)
# ifdef PTHREADS
pthread_t data_server;
# else
Expand Down
7 changes: 0 additions & 7 deletions armci/src/include/armci_shmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ extern char* Attach_Shared_Region(long idlist[], long size, long offset);
extern void Free_Shmem_Ptr(long id, long size, char* addr);
extern long armci_shmem_reg_size(int i, long id);
extern char* armci_shmem_reg_ptr(int i);
#ifdef MULTI_CTX
extern void armci_nattach_preallocate_info(int* segments, int *segsize);
#endif

#ifdef HITACHI
#define FIELD_NUM 0x1
#endif

#if defined(QUADRICS) && defined(MULTI_CTX)
#define POST_ALLOC_CHECK(temp,size) armci_checkMapped(temp,size);
#else
#define POST_ALLOC_CHECK(temp,size) ;
#endif

#define MAX_REGIONS 64

Expand Down
27 changes: 3 additions & 24 deletions armci/src/include/armcip.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,8 @@
printf("\n%d:%s:%d:%s:%s:%d",armci_me,__FILE__,__LINE__,FUNCTION_NAME,__ARMCI_ST,__ARMCI_NU)*/
#define ARMCI_PR_DBG(__ARMCI_ST,__ARMCI_NU)

#ifdef QUADRICS
#include <elan/elan.h>
#ifdef QSNETLIBS_VERSION_CODE
#ifndef DECOSF
# define ELAN_ACC
# define PENDING_OPER(x) ARMCI_ACC_INT
#endif

# if QSNETLIBS_VERSION_CODE > QSNETLIBS_VERSION(1,5,0)
# define LIBELAN_ATOMICS
# endif

#endif
extern void armci_elan_fence(int p);
#endif

/* we got problems on IA64/Linux64 with Elan if inlining is used */
#if defined(__GNUC__) && !defined(QUADRICS)
#if defined(__GNUC__)
# define INLINE inline
#else
# define INLINE
Expand Down Expand Up @@ -165,7 +149,7 @@ extern INLINE int armci_register_thread(thread_id_t id);
#endif

#if defined(CRAY_XT) || defined(CRAY_T3E) || defined(FUJITSU)\
|| defined(HITACHI) || (defined(QUADRICS) && !defined(ELAN_ACC))
|| defined(HITACHI)
#define ACC_COPY
#endif

Expand Down Expand Up @@ -312,12 +296,7 @@ extern void armci_finalize_fence();
#endif


#if defined(ELAN_ACC)
# define ORDER(op,proc)\
if( proc == armci_me || ( ARMCI_ACC(op) && ARMCI_ACC(PENDING_OPER(proc))) );\
else FENCE_NODE(proc)
# define UPDATE_FENCE_INFO(proc_)
#elif defined(CLUSTER) && !defined(QUADRICS) && !defined(HITACHI)\
#if defined(CLUSTER) && !defined(HITACHI)\
&& !defined(CRAY_SHMEM)
# define ORDER(op_,proc_)\
if(!SAMECLUSNODE(proc_) && op_ != GET )FENCE_ARR(proc_)=1
Expand Down
Loading

0 comments on commit 6ce0fb1

Please sign in to comment.