Skip to content

Commit

Permalink
Cleanup (#334)
Browse files Browse the repository at this point in the history
* remove DEC

* remove HITACHI

* remove mellanox

* remove Myrinet GM

* remove alliant and use of HP_SHARED_COMMON

* remove convex

* remove SGI, SGI Altix

* remove HPUX

* remove APOLLO, ARDENT, DELTA, IPSC and some portals3 tests

* remove CRAY SV1,SV2,T3E,YMP

* remove Cray T3D

* remove __CRAYX1_PRAGMA

* remove Cray X1
  • Loading branch information
ajaypanyala authored Jul 27, 2024
1 parent 8a4cac4 commit 3dffe9f
Show file tree
Hide file tree
Showing 85 changed files with 91 additions and 1,699 deletions.
5 changes: 0 additions & 5 deletions armci/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -373,24 +373,19 @@ if HAVE_ARMCI_STRIDE_INFO_INIT
ARMCI_SERIAL_TESTS += testing/testitr$(EXEEXT)
endif

testing_clone_SOURCES = testing/clone.c $(atsrc)
testing_fork_SOURCES = testing/fork.c $(atsrc)
testing_fttest_SOURCES = testing/fttest.c $(atsrc)
testing_gpctest_SOURCES = testing/gpctest.c $(atsrc)
testing_ipctest_SOURCES = testing/ipctest.c $(atsrc)
testing_msgcheck_SOURCES = testing/msgcheck.c $(atsrc)
testing_origptl_SOURCES = testing/origptl.c $(atsrc)
testing_perf_aggr_SOURCES = testing/perf_aggr.c $(atsrc)
testing_perf_nb_SOURCES = testing/perf_nb.c $(atsrc)
testing_perf_strided_SOURCES= testing/perf_strided.c $(atsrc)
testing_perf_SOURCES = testing/perf.c $(atsrc)
testing_perf2_SOURCES = testing/perf2.c $(atsrc)
testing_ptltest_SOURCES = testing/ptltest.c $(atsrc)
testing_shmclean_SOURCES = testing/shmclean.c $(atsrc)
testing_shmtest_SOURCES = testing/shmtest.c $(atsrc)
testing_simple_SOURCES = testing/simple.c $(atsrc)
testing_simplelock_SOURCES = testing/simplelock.c $(atsrc)
testing_te_SOURCES = testing/te.c $(atsrc)
testing_test2_SOURCES = testing/test2.c $(atsrc)
testing_test_groups_SOURCES = testing/test_groups.c $(atsrc)
testing_testitr_SOURCES = testing/testitr.c $(atsrc)
Expand Down
5 changes: 1 addition & 4 deletions armci/README
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Index
Supported Platforms
-------------------
- leadership class machines: Cray XT/XE/XK/XC, IBM Blue Gene/Q.
- shared-memory systems: SUN Solaris, SGI Altix, IBM, Linux
- shared-memory systems: SUN Solaris, IBM, Linux
- clusters of workstations (InfiniBand, sockets)

configure options
Expand Down Expand Up @@ -127,10 +127,7 @@ likely need to specify the optional ARG pointing to the necessary directories
and/or libraries. sockets is the default ARMCI network if nothing else is
specified.

--with-bgml=ARG select armci network as IBM BG/L
--with-cray-shmem=ARG select armci network as Cray XT shmem
--with-dcmf=ARG select armci network as IBM BG/P Deep Computing
Message Framework
--with-mpi-spawn=ARG select armci network as MPI-2 dynamic process mgmt
--with-openib=ARG select armci network as InfiniBand OpenIB
--with-sockets=ARG select armci network as Ethernet TCP/IP (default)
Expand Down
10 changes: 3 additions & 7 deletions armci/src/collectives/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int _armci_gop_init=0; /* tells us if we have a buffers allocated */
static int _armci_gop_shmem =0; /* tells us to use shared memory for gops */
extern void armci_util_wait_int(volatile int *, int , int );
static int empty=EMPTY,full=FULL;
#if !defined(SGIALTIX) && defined(SYSV) || defined(MMAP) || defined(WIN32)
#if defined(SYSV) || defined(MMAP) || defined(WIN32)
static void **ptr_arr=NULL;
#endif

Expand Down Expand Up @@ -218,7 +218,7 @@ void armci_msg_gop_init()
memory from malloc because of a problem with cc on SV1
*/
if(work==NULL)_allocate_mem_for_work();
#if !defined(SGIALTIX) && defined(SYSV) || defined(MMAP) || defined(WIN32)
#if defined(SYSV) || defined(MMAP) || defined(WIN32)
if(ARMCI_Uses_shm()){
char *tmp;
int size = sizeof(bufstruct);
Expand Down Expand Up @@ -257,7 +257,7 @@ void armci_msg_gop_init()

void armci_msg_gop_finalize()
{
#if !defined(SGIALTIX) && defined(SYSV) || defined(MMAP) || defined(WIN32)
#if defined(SYSV) || defined(MMAP) || defined(WIN32)
if(ARMCI_Uses_shm()){
PARMCI_Free(ptr_arr[armci_me]);
free(ptr_arr);
Expand Down Expand Up @@ -424,10 +424,6 @@ int armci_msg_nproc()
#endif
}

#ifdef CRAY_YMP
#define BROKEN_MPI_ABORT
#endif

double armci_timer()
{
#if defined(MSG_COMMS_MPI)
Expand Down
15 changes: 4 additions & 11 deletions armci/src/common/armci.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#if HAVE_STDARG_H
# include <stdarg.h>
#endif
#if defined(CRAY) && !defined(__crayx1)
#if defined(CRAY)
# include <sys/category.h>
# include <sys/resource.h>
# if HAVE_UNISTD_H
Expand Down Expand Up @@ -75,7 +75,7 @@ thread_id_t armci_usr_tid;
#if !defined(THREAD_SAFE)
double armci_internal_buffer[BUFSIZE_DBL];
#endif
#if defined(SYSV) || defined(WIN32) || defined(MMAP) || defined(CATAMOUNT)
#if defined(SYSV) || defined(WIN32) || defined(MMAP)
# include "locks.h"
lockset_t lockid;
#endif
Expand Down Expand Up @@ -177,10 +177,7 @@ void ARMCI_Error(char *msg, int code)

void armci_allocate_locks()
{
#if !defined(CRAY_SHMEM) && \
defined(CATAMOUNT)
armcill_allocate_locks(NUM_LOCKS);
#elif (defined(SYSV) || defined(WIN32) || defined(MMAP))
#if (defined(SYSV) || defined(WIN32) || defined(MMAP))
if(armci_nproc == 1)return;
# if defined(SPINLOCK) || defined(PMUTEX) || defined(PSPIN)
CreateInitLocks(NUM_LOCKS, &lockid);
Expand Down Expand Up @@ -404,11 +401,7 @@ int _armci_init(MPI_Comm comm)
#if defined(SYSV) || defined(WIN32) || defined(MMAP)
/* init shared/K&R memory */
if(ARMCI_Uses_shm() ) {
# ifdef SGIALTIX
armci_altix_shm_init();
# else
armci_shmem_init();
# endif
armci_shmem_init();
}

#endif
Expand Down
8 changes: 1 addition & 7 deletions armci/src/common/clusterinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@
/*** stores cluster configuration. Initialized before user threads are created and then read-only ***/
armci_clus_t *armci_clus_info;

#if defined(SGIALTIX)
# define GETHOSTNAME altix_gethostname
static int altix_gethostname(char *name, int len) {
sprintf(name,"altix");
return 0;
}
#elif defined(CRAY_XT)
#if defined(CRAY_XT)
#define GETHOSTNAME cnos_gethostname
static int cnos_gethostname(char *name, int len)
{
Expand Down
4 changes: 2 additions & 2 deletions armci/src/common/gpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ return ptr;
\*/
void ARMCI_Gpc_lock(int proc)
{
#if defined(CLUSTER) && !defined(SGIALTIX)
#if defined(CLUSTER)
int lock = (proc-armci_clus_info[armci_clus_id(proc)].master)%NUM_LOCKS;
#else
int lock = 0;
Expand All @@ -300,7 +300,7 @@ return 0;
\*/
void ARMCI_Gpc_unlock(int proc)
{
#if defined(CLUSTER) && !defined(SGIALTIX)
#if defined(CLUSTER)
int lock = (proc-armci_clus_info[armci_clus_id(proc)].master)%NUM_LOCKS;
#else
int lock = 0;
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 @@ -8,7 +8,7 @@
# include <stdio.h>
#endif

#if !defined(ACC_COPY) &&!defined(CRAY_YMP) &&!defined(CYGNUS)&&!defined(CYGWIN)
#if !defined(ACC_COPY) &&!defined(CYGNUS)&&!defined(CYGWIN)
# define REMOTE_OP
#endif

Expand Down
15 changes: 3 additions & 12 deletions armci/src/common/signaltrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
extern void Error();
#endif

#if (defined(ENCORE) || defined(SEQUENT) || defined(ARDENT))
#if (defined(ENCORE) || defined(SEQUENT))
# define SigType int
#else
# define SigType void
Expand Down Expand Up @@ -142,7 +142,7 @@ SigType SigChldHandler(sig)
int sig;
{
int status;
#if defined(ALLIANT) || defined(ENCORE) || defined(SEQUENT) || defined(NEXT)
#if defined(ENCORE) || defined(SEQUENT) || defined(NEXT)
union wait ustatus;
#endif

Expand All @@ -153,7 +153,7 @@ SigType SigChldHandler(sig)
Error("SigChldHandler: error from signal setting SIGCHLD",0);
#endif

#if defined(ALLIANT) || defined(ENCORE) || defined(SEQUENT) || defined(NEXT)
#if defined(ENCORE) || defined(SEQUENT) || defined(NEXT)

# if defined(LINUX)
ret = wait(&ustatus);
Expand Down Expand Up @@ -590,15 +590,6 @@ void ARMCI_ChildrenTrapSignals()
TrapSigAbort();
TrapSigTerm();
TrapSigInt();

#if defined(SGI)
TrapSigIot();
#endif

#ifdef SGI
TrapSigXcpu();
#endif

}


Expand Down
2 changes: 1 addition & 1 deletion armci/src/devices/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ int armci_ListenAndAccept(int sock)
return msgsock;
}

#if !defined(SGI) && !defined(WIN32)
#if !defined(WIN32)
struct hostent *gethostbyname();
#endif

Expand Down
6 changes: 2 additions & 4 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(CATAMOUNT)
#if (defined(SYSV) || defined(WIN32)|| defined(MMAP)) && !defined(NO_SHM)
#define CLUSTER

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

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

Expand Down Expand Up @@ -280,8 +280,6 @@ extern void armci_finalize_fence();

# define SAMECLUSNODE(p)\
( ((p) <= armci_clus_last) && ((p) >= armci_clus_first) )
#elif defined(__crayx1)
# define SAMECLUSNODE(p) 1
#else
# define SAMECLUSNODE(p) ((p)==armci_me)
#endif
Expand Down
16 changes: 4 additions & 12 deletions armci/src/include/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,9 @@
# include <string.h>
#endif

#if 1 || defined(CRAY_T3E) || defined(CRAY_XT)
#if 1 || defined(CRAY_XT)
# define MEMCPY
#endif
#if defined(LINUX64) && defined(SGIALTIX) && defined(MSG_COMMS_MPI)
/* fastbcopy from Wayne Vieira and Gerardo Cisneros */
#define MEMCPY
#define armci_copy(src, dst, len) _fastbcopy(src, dst, len)
#define memcpy(dst, src, len) _fastbcopy(src, dst, len)
#define bcopy(src, dst, len) _fastbcopy(src, dst, len)
#endif

#ifndef EXTERN
# define EXTERN extern
Expand All @@ -30,7 +23,7 @@
EXTERN long long _armci_vec_sync_flag;
#endif

#if defined(SGI) || defined(FUJITSU) || defined(HPUX) || defined(SOLARIS) || defined(__ia64__) || defined(__crayx1)
#if defined(FUJITSU) || defined(SOLARIS) || defined(__ia64__)
# define PTR_ALIGN
#endif

Expand Down Expand Up @@ -182,8 +175,7 @@
#endif

/* macros to ensure ordering of consecutive puts or gets following puts */
#if defined(_CRAYMPP) || defined(__crayx1)\
|| defined(CRAY_SHMEM)
#if defined(_CRAYMPP) || defined(CRAY_SHMEM)
#if defined(CRAY) || defined(CRAY_XT)
# include <mpp/shmem.h>
#else
Expand Down Expand Up @@ -265,7 +257,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)
#elif defined(LINUX) || defined(CRAY) || defined(WIN32)
# define DCOPY2D c_dcopy2d_n_
# define DCOPY1D c_dcopy1d_n_
#else
Expand Down
41 changes: 2 additions & 39 deletions armci/src/include/locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,61 +45,24 @@ extern PAD_LOCK_T *_armci_int_mutexes;
# define PAD_LOCK_T LOCK_T
extern PAD_LOCK_T *_armci_int_mutexes;

#elif defined(SPINLOCK) && defined(SGIALTIX)
# define NAT_LOCK(x,p) armci_acquire_spinlock((LOCK_T*)( ((PAD_LOCK_T*)(((void**)_armci_int_mutexes)[p]))+x ))
# define NAT_UNLOCK(x,p) armci_release_spinlock((LOCK_T*)( ((PAD_LOCK_T*)(((void**)_armci_int_mutexes)[p]))+x ))
extern PAD_LOCK_T *_armci_int_mutexes;

#elif defined(SPINLOCK)
# define NAT_LOCK(x,p) armci_acquire_spinlock((LOCK_T*)(_armci_int_mutexes+(x)))
# define NAT_UNLOCK(x,p) armci_release_spinlock((LOCK_T*)(_armci_int_mutexes+(x)))
extern PAD_LOCK_T *_armci_int_mutexes;

#elif defined(SGI)
# define SGI_SPINS 100
# include <ulocks.h>
typedef struct {
int id;
ulock_t * lock_array[NUM_LOCKS];
}lockset_t;
extern lockset_t lockset;
# define NAT_LOCK(x,p) (void) uswsetlock(lockset.lock_array[(x)],SGI_SPINS)
# define NAT_UNLOCK(x,p) (void) usunsetlock(lockset.lock_array[(x)])

#elif defined(CONVEX)
# include <sys/cnx_ail.h>
typedef struct{
unsigned state;
unsigned pad[15];
} lock_t;
typedef int lockset_t;
extern lock_t *lock_array;
extern void setlock(unsigned * volatile lp);
extern void unsetlock(unsigned * volatile lp);
# define NAT_LOCK(x,p) (void) setlock(&lock_array[x].state)
# define NAT_UNLOCK(x,p) (void) unsetlock(&lock_array[(x)].state)

#elif defined(WIN32)
typedef int lockset_t;
extern void setlock(int);
extern void unsetlock(int);
# define NAT_LOCK(x,p) setlock(x)
# define NAT_UNLOCK(x,p) unsetlock(x)

#elif defined(CRAY_YMP) && !defined(__crayx1)
# include <tfork.h>
typedef int lockset_t;
extern lock_t cri_l[NUM_LOCKS];
# pragma _CRI common cri_l
# define NAT_LOCK(x,p) t_lock(cri_l+(x))
# define NAT_UNLOCK(x,p) t_unlock(cri_l+(x))

#elif defined(CRAY_T3E) || defined(__crayx1) || defined(CATAMOUNT) || defined(CRAY_SHMEM)
#elif defined(CRAY_SHMEM)
# include <limits.h>
# if defined(CRAY) || defined(CRAY_XT)
# include <mpp/shmem.h>
# endif
# if defined(LINUX64) || defined(__crayx1) || defined(CATAMOUNT)
# if defined(LINUX64)
# define _INT_MIN_64 (LONG_MAX-1)
# endif
# undef NUM_LOCKS
Expand Down
6 changes: 0 additions & 6 deletions armci/src/include/semaphores.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ union semun {
# endif
#endif

/* on HPUX 10.2 SEMMSL is much bigger than realistically we can allocate */
#ifdef HPUX
#undef SEMMSL
#define SEMMSL 64
#endif

extern struct sembuf sops;
extern int semaphoreID;
int semop();
Expand Down
Loading

0 comments on commit 3dffe9f

Please sign in to comment.