Skip to content

Commit

Permalink
remove SGI, SGI Altix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 27, 2024
1 parent be5ef2c commit 3fc800b
Show file tree
Hide file tree
Showing 28 changed files with 23 additions and 471 deletions.
2 changes: 1 addition & 1 deletion 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
6 changes: 3 additions & 3 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
6 changes: 1 addition & 5 deletions armci/src/common/armci.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,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
9 changes: 0 additions & 9 deletions armci/src/common/signaltrap.c
Original file line number Diff line number Diff line change
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
9 changes: 1 addition & 8 deletions armci/src/include/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
#if 1 || defined(CRAY_T3E) || 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(HPUX) || defined(SOLARIS) || defined(__ia64__) || defined(__crayx1)
# define PTR_ALIGN
#endif

Expand Down
16 changes: 0 additions & 16 deletions armci/src/include/locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,11 @@ 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(WIN32)
typedef int lockset_t;
extern void setlock(int);
Expand Down
9 changes: 0 additions & 9 deletions armci/src/include/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ static int testandset(void *spinlock) {
}
# define TESTANDSET testandset

#elif defined(SGI)
# if DEBUG_SPINLOCK
# warning SPINLOCK: SGI
# endif
# include <mutex.h>
# define SPINLOCK
# define TESTANDSET(x) __lock_test_and_set((x), 1)
# define RELEASE_SPINLOCK __lock_release

/*#elif defined(AIX)*/
#elif HAVE_SYS_ATOMIC_OP_H
# if DEBUG_SPINLOCK
Expand Down
94 changes: 0 additions & 94 deletions armci/src/locks/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,6 @@ extern void armci_die(char*,int);

void **ptr_arr;

#ifdef SGIALTIX

void CreateInitLocks(int num_locks, lockset_t *plockid)
{
int locks_per_proc, size;

/* locks per process in the SMP node */
locks_per_proc = num_locks/armci_clus_info[armci_clus_me].nslave + 1;
locks_per_proc = num_locks; /* this is am altix hack and no clue why this is works */
size=locks_per_proc*sizeof(PAD_LOCK_T);
ptr_arr = (void**)malloc(armci_nproc*sizeof(void*));
PARMCI_Malloc(ptr_arr, size);
_armci_int_mutexes = (PAD_LOCK_T*) ptr_arr;
bzero((char*)ptr_arr[armci_me],size);
}

void DeleteLocks(lockset_t lockid) {
ptr_arr = (void**)_armci_int_mutexes;
PARMCI_Free(ptr_arr[armci_me]);
_armci_int_mutexes = (PAD_LOCK_T*)0;
}

#else

void CreateInitLocks(int num_locks, lockset_t *plockid)
{
int locks_per_proc, size;
Expand Down Expand Up @@ -99,76 +75,6 @@ void DeleteLocks(lockset_t lockid)
{
_armci_int_mutexes = (PAD_LOCK_T*)0;
}
#endif


/********************* all SGI systems ****************/
#elif defined(SGI)
#define FILE_LEN 200
lockset_t lockset;
static char arena_name[FILE_LEN];
usptr_t *arena_ptr;
static int avail =0;

extern char *getenv(const char *);

void CreateInitLocks(int num_locks, lockset_t *lockid)
{
int i;
char *tmp;

if(num_locks > NUM_LOCKS) armci_die("To many locks requested", num_locks);
lockset.id = (int)getpid();
if (!(tmp = getenv("ARENA_DIR"))) tmp = "/tmp";
sprintf(arena_name,"%s/armci_arena%d.%ld", tmp,armci_clus_me,lockset.id);

(void) usconfig(CONF_ARENATYPE, US_GENERAL);
(void) usconfig(CONF_INITUSERS, (unsigned int)
armci_clus_info[armci_clus_me].nslave+1); /* +1 for server */
arena_ptr = usinit(arena_name);
if(!arena_ptr) armci_die("Failed to Create Arena", 0);

for(i=0; i<num_locks; i++){
lockset.lock_array[i] = usnewlock(arena_ptr);
if(lockset.lock_array[i] == NULL) armci_die("Failed to Create Lock", i);
}

*lockid = lockset;
avail = 1;
}


void InitLocks(int num_locks, lockset_t lockid)
{
int i;
char *tmp;

/* if(avail) armci_die("Arena already attached", avail); */
lockset = lockid;
if (!(tmp = getenv("ARENA_DIR"))) tmp = "/tmp";
sprintf(arena_name,"%s/armci_arena%d.%ld", tmp,armci_clus_me,lockset.id);

(void) usconfig(CONF_ARENATYPE, US_GENERAL);
arena_ptr = usinit(arena_name);
if(!arena_ptr) armci_die("Failed to Attach to Arena", lockid.id);
/* else fprintf(stderr, "attached arena %x\n",arena_ptr); */

for(i=0; i<num_locks; i++){
if(lockset.lock_array[i] == NULL) armci_die("Failed to Attach Lock", i);
}
avail = 1;
}


void DeleteLocks(lockset_t lockid)
{
/* fprintf(stderr, "deleting arena %x\n",arena_ptr);*/
if(!avail)return;
else avail = 0;
usdetach (arena_ptr);
arena_ptr = 0;
(void)unlink(arena_name); /*ignore armci_die code:file might be already gone*/
}

#elif defined(WIN32)
/****************************** Windows NT ********************************/
Expand Down
Loading

0 comments on commit 3fc800b

Please sign in to comment.