Skip to content

Commit

Permalink
remove HITACHI
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 26, 2024
1 parent 8986d44 commit a036343
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 221 deletions.
2 changes: 0 additions & 2 deletions armci/src/collectives/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ static void tcg_rcv(long type, void *buf, long lenbuf, long *lenmes,
# include <assert.h>
#endif
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifndef HITACHI
# include <sched.h>
#endif
#endif
#include "armci.h"
#include "acc.h"

Expand Down
12 changes: 6 additions & 6 deletions armci/src/common/armci.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ int *_armci_argc=NULL;
char ***_armci_argv=NULL;
thread_id_t armci_usr_tid;

#if !defined(HITACHI) && !defined(THREAD_SAFE)
#if !defined(THREAD_SAFE)
double armci_internal_buffer[BUFSIZE_DBL];
#endif
#if defined(SYSV) || defined(WIN32) || defined(MMAP) || defined(HITACHI) || defined(CATAMOUNT)
#if defined(SYSV) || defined(WIN32) || defined(MMAP) || defined(CATAMOUNT)
# include "locks.h"
lockset_t lockid;
#endif
Expand All @@ -100,7 +100,7 @@ int _armci_malloc_local_region;

void ARMCI_Cleanup()
{
#if (defined(SYSV) || defined(WIN32) || defined(MMAP))&& !defined(HITACHI)
#if (defined(SYSV) || defined(WIN32) || defined(MMAP))
Delete_All_Regions();
if(armci_nproc>1)
DeleteLocks(lockid);
Expand Down Expand Up @@ -178,9 +178,9 @@ void ARMCI_Error(char *msg, int code)
void armci_allocate_locks()
{
#if !defined(CRAY_SHMEM) && \
( defined(HITACHI) || defined(CATAMOUNT) )
defined(CATAMOUNT)
armcill_allocate_locks(NUM_LOCKS);
#elif (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(HITACHI)
#elif (defined(SYSV) || defined(WIN32) || defined(MMAP))
if(armci_nproc == 1)return;
# if defined(SPINLOCK) || defined(PMUTEX) || defined(PSPIN)
CreateInitLocks(NUM_LOCKS, &lockid);
Expand All @@ -195,7 +195,7 @@ void armci_allocate_locks()

void ARMCI_Set_shm_limit(unsigned long shmemlimit)
{
#if (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(HITACHI)
#if (defined(SYSV) || defined(WIN32) || defined(MMAP))
#define EXTRASHM 1024 /* extra shmem used internally in ARMCI */
unsigned long limit;
limit = shmemlimit+EXTRASHM;
Expand Down
22 changes: 2 additions & 20 deletions armci/src/common/clusterinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,7 @@
/*** stores cluster configuration. Initialized before user threads are created and then read-only ***/
armci_clus_t *armci_clus_info;

#ifdef HITACHI
#include <hmpp/nalloc.h>
# define GETHOSTNAME sr_gethostname
ndes_t _armci_group;

static int sr_gethostname(char *name, int len)
{
int no;
pid_t ppid;

if(hmpp_nself (&_armci_group,&no,&ppid,0,NULL) <0)
return -1;

if(len<6)armci_die("len too small",len);
if(no>1024)armci_die("expected node id <1024",no);
sprintf(name,"n%d",no);
return 0;
}
#elif defined(SGIALTIX)
#if defined(SGIALTIX)
# define GETHOSTNAME altix_gethostname
static int altix_gethostname(char *name, int len) {
sprintf(name,"altix");
Expand Down Expand Up @@ -383,7 +365,7 @@ void armci_init_clusinfo()
process_hostlist(name); /* compute cluster info */
#endif

#if (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(HITACHI)
#if (defined(SYSV) || defined(WIN32) || defined(MMAP))
armci_set_shmem_limit_per_node(armci_clus_info[0].nslave);
#endif
armci_master = armci_clus_info[armci_clus_me].master;
Expand Down
10 changes: 2 additions & 8 deletions armci/src/common/ds-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ else if(len <41*PIPE_BUFSIZE){
else
#if defined(VAPI)
len = 8*4096;
#elif defined(HITACHI)
len = 128*1024-128;
#else
len = 64*1024-128;
#endif
Expand All @@ -104,11 +102,7 @@ buf_arg_t arg;
int packsize = PACK_SIZE(msginfo->datalen);

arg.buf_posted = arg.buf = buf;
#ifdef HITACHI
arg.count = 0;
#else
arg.count = bufsize;
#endif
arg.proc = (msginfo->operation==GET)?msginfo->to:msginfo->from;
arg.op = msginfo->operation;

Expand Down Expand Up @@ -143,7 +137,7 @@ 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) || defined(HITACHI)
#if defined(GM)
arg.buf_posted = msginfo->tag.data_ptr;
#endif
#if defined(VAPI)
Expand Down Expand Up @@ -953,7 +947,7 @@ void armci_data_server(void *mesg)
}
armci_server_ipc(msginfo, descr, buffer, buflen);
break;
#if defined(SOCKETS) || defined(HITACHI) || defined(MPI_SPAWN) || defined(MPI_MT)
#if defined(SOCKETS) || defined(MPI_SPAWN) || defined(MPI_MT)
case QUIT:
if(DEBUG_){
printf("%d(serv):got QUIT request from %d\n",armci_me, from);
Expand Down
4 changes: 0 additions & 4 deletions armci/src/common/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ int armci_pack_strided(int op, void* scale, int proc,

#ifdef STRIDED_GET_BUFLEN
if(op==GET)bufsize=STRIDED_GET_BUFLEN;
# ifdef HITACHI
else
if(stride_levels || ARMCI_ACC(op))bufsize=MSG_BUFLEN_SMALL-PAGE_SIZE;
# endif
#endif

#if (defined(GM_) || defined(VAPI_))
Expand Down
4 changes: 0 additions & 4 deletions armci/src/include/armci_shmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ 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 HITACHI
#define FIELD_NUM 0x1
#endif

#define POST_ALLOC_CHECK(temp,size) ;

#define MAX_REGIONS 64
Expand Down
22 changes: 6 additions & 16 deletions armci/src/include/armcip.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# define sleep(x) Sleep(100*(x))
#endif

#if (defined(SYSV) || defined(WIN32)|| defined(MMAP)) && !defined(NO_SHM) && !defined(HITACHI) && !defined(CATAMOUNT)
#if (defined(SYSV) || defined(WIN32)|| defined(MMAP)) && !defined(NO_SHM) && !defined(CATAMOUNT)
#define CLUSTER

#ifdef SERVER_THREAD
Expand Down Expand Up @@ -148,8 +148,7 @@ extern INLINE int armci_register_thread(thread_id_t id);
# endif
#endif

#if defined(CRAY_XT) || defined(CRAY_T3E) || defined(FUJITSU)\
|| defined(HITACHI)
#if defined(CRAY_XT) || defined(CRAY_T3E) || defined(FUJITSU)
#define ACC_COPY
#endif

Expand All @@ -173,18 +172,14 @@ extern INLINE int armci_register_thread(thread_id_t id);
# define RESERVED_BUFLEN ((sizeof(request_header_t)>>3)+3*MAX_STRIDE_LEVEL +\
EXTRA_MSG_BUFLEN_DBL)
#endif

#if defined(HITACHI)
# define BUFSIZE ((0x50000) * sizeof(double))
#else
/* packing algorithm for double complex numbers requires even number */

/* packing algorithm for double complex numbers requires even number */
# ifdef MSG_BUFLEN_DBL
# define BUFSIZE_DBL (MSG_BUFLEN_DBL - RESERVED_BUFLEN)
# else
# define BUFSIZE_DBL 32768
# endif
# define BUFSIZE (BUFSIZE_DBL * sizeof(double))
#endif

/* note opcodes must be lower than ARMCI_ACC_OFF !!! */
#define PUT 1
Expand All @@ -200,14 +195,10 @@ extern INLINE int armci_register_thread(thread_id_t id);

extern int armci_me, armci_nproc;
extern int _armci_initialized;
#ifdef HITACHI
extern int sr8k_server_ready;
extern double *armci_internal_buffer;
#else

#if !defined(THREAD_SAFE)
extern double armci_internal_buffer[BUFSIZE_DBL];
#endif
#endif

extern void armci_shmem_init();
extern void armci_krmalloc_init_localmem();
Expand Down Expand Up @@ -296,8 +287,7 @@ extern void armci_finalize_fence();
#endif


#if defined(CLUSTER) && !defined(HITACHI)\
&& !defined(CRAY_SHMEM)
#if defined(CLUSTER) && !defined(CRAY_SHMEM)
# define ORDER(op_,proc_)\
if(!SAMECLUSNODE(proc_) && op_ != GET )FENCE_ARR(proc_)=1
# define UPDATE_FENCE_INFO(proc_) if(!SAMECLUSNODE(proc_))FENCE_ARR(proc_)=1
Expand Down
28 changes: 2 additions & 26 deletions armci/src/include/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# include <string.h>
#endif

#if 1 || defined(HITACHI) || defined(CRAY_T3E) || defined(CRAY_XT)
#if 1 || defined(CRAY_T3E) || defined(CRAY_XT)
# define MEMCPY
#endif
#if defined(LINUX64) && defined(SGIALTIX) && defined(MSG_COMMS_MPI)
Expand Down Expand Up @@ -126,15 +126,6 @@
# define armci_get2D(p, bytes, count, src_ptr,src_stride,dst_ptr,dst_stride)\
CopyPatchFrom(src_ptr, src_stride, dst_ptr, dst_stride,count,bytes,p)

#elif defined(HITACHI)

extern void armcill_put2D(int proc, int bytes, int count,
void* src_ptr,int src_stride, void* dst_ptr,int dst_stride);
extern void armcill_get2D(int proc, int bytes, int count,
void* src_ptr,int src_stride, void* dst_ptr,int dst_stride);
# define armci_put2D armcill_put2D
# define armci_get2D armcill_get2D

#elif defined(NB_NONCONT)

extern void armcill_wait_put();
Expand Down Expand Up @@ -279,7 +270,7 @@ void c_dcopy13_(const int* const restrict rows,
#if defined(AIX)
# define DCOPY2D c_dcopy2d_u_
# define DCOPY1D c_dcopy1d_u_
#elif defined(LINUX) || defined(__crayx1) || defined(HPUX64) || defined(CRAY) || defined(WIN32) || defined(HITACHI)
#elif defined(LINUX) || defined(__crayx1) || defined(HPUX64) || defined(CRAY) || defined(WIN32)
# define DCOPY2D c_dcopy2d_n_
# define DCOPY1D c_dcopy1d_n_
#else
Expand Down Expand Up @@ -308,21 +299,6 @@ void c_dcopy13_(const int* const restrict rows,
shmem_get32((void *)(dst),(void *)(src),(int)(n)/4,(proc));\
shmem_quiet()

#elif defined(HITACHI)

extern void armcill_put(void *src, void *dst, int bytes, int proc);
extern void armcill_get(void *src, void *dst, int bytes, int proc);

# define armci_put(src,dst,n,proc) \
if(((proc)<=armci_clus_last) && ((proc>= armci_clus_first))){\
armci_copy(src,dst,n);\
} else { armcill_put((src), (dst),(n),(proc));}

# define armci_get(src,dst,n,proc)\
if(((proc)<=armci_clus_last) && ((proc>= armci_clus_first))){\
armci_copy(src,dst,n);\
} else { armcill_get((src), (dst),(n),(proc));}

#elif defined(FUJITSU)

# include "fujitsu-vpp.h"
Expand Down
11 changes: 1 addition & 10 deletions armci/src/include/locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# error cannot run
#endif

#if (defined(SPINLOCK) || defined(PMUTEX) || defined(PSPIN) || defined(HITACHI))
#if (defined(SPINLOCK) || defined(PMUTEX) || defined(PSPIN))
# include "armci_shmem.h"
typedef struct {
long off;
Expand Down Expand Up @@ -55,15 +55,6 @@ extern PAD_LOCK_T *_armci_int_mutexes;
# define NAT_UNLOCK(x,p) armci_release_spinlock((LOCK_T*)(_armci_int_mutexes+(x)))
extern PAD_LOCK_T *_armci_int_mutexes;

#elif defined(HITACHI)
extern void armcill_lock(int mutex, int proc);
extern void armcill_unlock(int mutex, int proc);
# define LOCK_T int
# define PAD_LOCK_T LOCK_T
# define NAT_LOCK(x,p) armcill_lock((x),(p))
# define NAT_UNLOCK(x,p) armcill_unlock((x),(p))
extern PAD_LOCK_T *_armci_int_mutexes;

#elif defined(SGI)
# define SGI_SPINS 100
# include <ulocks.h>
Expand Down
11 changes: 1 addition & 10 deletions armci/src/include/request.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ extern INLINE void _armci_buf_set_cmpld_idx(int idx, int state);
typedef unsigned short msg_id_t;
# define DTAG_ ((1<<(sizeof(msg_id_t)*8))-1)
# define NB_SOCKETS_ /* define NB_SOCKETS to allow non-blocking path */
#elif defined(HITACHI)
# include "sr8k.h"
#elif defined(MPI_SPAWN) || defined(MPI_MT)
# include "mpi2.h"
typedef long msg_tag_t;
Expand Down Expand Up @@ -171,11 +169,7 @@ typedef struct {


#ifndef MSG_BUFLEN_DBL
# if defined(HITACHI)
# define MSG_BUFLEN_DBL 0x50000
# else
# define MSG_BUFLEN_DBL 50000
# endif
#endif

#define MSG_BUFLEN sizeof(double)*MSG_BUFLEN_DBL
Expand Down Expand Up @@ -292,10 +286,7 @@ extern void armci_server_goodbye(request_header_t* msginfo);
extern void armci_serv_quit();
extern void armci_server_goodbye(request_header_t* msginfo);
#endif
#ifdef HITACHI
extern void armci_server_goodbye(request_header_t* msginfo);
extern void armci_serv_quit();
#endif

extern void armci_server_ipc(request_header_t* msginfo, void* descr,
void* buffer, int buflen);

Expand Down
17 changes: 4 additions & 13 deletions armci/src/memory/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ static context_t ctx_localmem;
static context_t ctx_mlocalmem;
#endif

#if defined(SYSV) || defined(WIN32) || defined(MMAP) || defined(HITACHI)
#if defined(SYSV) || defined(WIN32) || defined(MMAP)
#include "armci_shmem.h"

#if !defined(USE_SHMEM) && defined(HITACHI)
# define USE_SHMEM
#endif

#if !defined(SERVER_THREAD) ||\
defined(USE_SHMEM)
#define RMA_NEEDS_SHMEM
Expand Down Expand Up @@ -266,9 +262,7 @@ void armci_shmem_malloc(void *ptr_arr[], armci_size_t bytes)
armci_me,myptr, *(void**)myptr,size); fflush(stdout);
}
}
# ifdef HITACHI
armci_register_shmem(myptr,size,idlist+1,idlist[0],ptr_ref_arr[armci_clus_me]);
# endif

# if defined(DATA_SERVER)

/* get server reference address for every cluster node to perform
Expand Down Expand Up @@ -562,9 +556,6 @@ void armci_shmem_malloc_group(void *ptr_arr[], armci_size_t bytes,
armci_me,myptr, *(void**)myptr,size); fflush(stdout);
}
}
# ifdef HITACHI
armci_register_shmem_grp(myptr,size,idlist+1,idlist[0],ptr_ref_arr[armci_clus_me],group);
# endif

# if defined(DATA_SERVER)

Expand Down Expand Up @@ -955,7 +946,7 @@ int ARMCI_Uses_shm()
{
int uses=0;

#if (defined(SYSV) || defined(WIN32) || defined(MMAP) ||defined(HITACHI)) && !defined(NO_SHM)
#if (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(NO_SHM)
# ifdef RMA_NEEDS_SHMEM
if(armci_nproc >1) uses= 1; /* always unless serial mode */
# else
Expand All @@ -977,7 +968,7 @@ int ARMCI_Uses_shm_grp(ARMCI_Group *group)
ARMCI_Group_size(group, &grp_nproc);
ARMCI_Group_rank(group, &grp_me);

#if (defined(SYSV) || defined(WIN32) || defined(MMAP) ||defined(HITACHI)) && !defined(NO_SHM)
#if (defined(SYSV) || defined(WIN32) || defined(MMAP)) && !defined(NO_SHM)
# ifdef RMA_NEEDS_SHMEM
if(grp_nproc >1) uses= 1; /* always unless serial mode */
# else
Expand Down
Loading

0 comments on commit a036343

Please sign in to comment.