Skip to content

Commit

Permalink
remove convex
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 27, 2024
1 parent 8087124 commit be5ef2c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 104 deletions.
13 changes: 0 additions & 13 deletions armci/src/include/locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ 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);
Expand Down
80 changes: 0 additions & 80 deletions armci/src/locks/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,86 +170,6 @@ void DeleteLocks(lockset_t lockid)
(void)unlink(arena_name); /*ignore armci_die code:file might be already gone*/
}


/***************** Convex/HP Exemplar ****************/
#elif defined(CONVEX)
#include <sys/param.h>
#include <sys/file.h>
#include <sys/cnx_mman.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/cnx_ail.h>

#define FILE_LEN 200
lock_t *lock_array;
static char file_name[FILE_LEN];
static int fd=-1;
static unsigned shmem_size=-1;


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

if(num_locks > NUM_LOCKS) armci_die("To many locks requested", num_locks);
*lockid = (int)getpid();
sprintf(file_name,"/tmp/ga.locks.%ld", *lockid);
if ( (fd = open(file_name, O_RDWR|O_CREAT, 0666)) < 0 )
armci_die("CreateInitLocks: failed to open temporary file",0);

shmem_size = (NUM_LOCKS)*sizeof(lock_t);
lock_array = (lock_t*) mmap((caddr_t) 0, shmem_size,
PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|CNX_MAP_SEMAPHORE|MAP_SHARED, fd, 0);

if(((unsigned)lock_array)%16)armci_die("CreateInitLocks: not aligned",0);
for (i=0; i<NUM_LOCKS; i++)
lock_array[i].state = 0;
}


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

if(num_locks > NUM_LOCKS) armci_die("To many locks requested", num_locks);
sprintf(file_name,"/tmp/ga.locks.%ld", lockid);
if ( (fd = open(file_name, O_RDWR|O_CREAT, 0666)) < 0 )
armci_die("InitLocks: failed to open temporary file",0);

shmem_size = (NUM_LOCKS)*sizeof(lock_t);
lock_array = (lock_t*) mmap((caddr_t) 0, shmem_size,
PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|CNX_MAP_SEMAPHORE|MAP_SHARED, fd, 0);
if(((unsigned)lock_array)%16)armci_die("InitLocks: not aligned",0);
}


void DeleteLocks(lockset_t lockid)
{
lock_array = 0;
(void)unlink(file_name); /*ignore armci_die code: file might be already gone*/
(void)munmap((char *) shmem_size, 0);
}


void setlock(unsigned * volatile lp)
{
volatile unsigned flag;

flag = fetch_and_inc32(lp);
while(flag){
flag = fetch32(lp);
}
}


void unsetlock(unsigned * volatile lp)
{
(void)fetch_and_clear32(lp);
}


#elif defined(WIN32)
/****************************** Windows NT ********************************/
#include <process.h>
Expand Down
2 changes: 1 addition & 1 deletion armci/src/memory/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
#if defined(SUN)||defined(SOLARIS)
# undef _SHMMAX
# define _SHMMAX (1024) /* memory in KB */
#elif defined(SGI64) || defined(AIX) || defined(CONVEX)
#elif defined(SGI64) || defined(AIX)
# undef _SHMMAX
# define _SHMMAX ((unsigned long)512*1024)
#elif defined(SGI) && !defined(SGI64)
Expand Down
4 changes: 2 additions & 2 deletions global/testing/ipc.clean.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ char *AttachSharedRegion(id, size)
}

#endif
#if defined(CONVEX) || defined(APOLLO)
#if defined(APOLLO)

#include <sys/time.h>
#include <sys/types.h>
Expand Down Expand Up @@ -333,7 +333,7 @@ long DeleteSharedRegion(id)
char *AttachSharedRegion(id, size)
long id, size;
{
Error("AttachSharedRegion: need mods for this to work on CONVEX", (long) -1);
Error("AttachSharedRegion: need mods for this to work", (long) -1);
}

long DeleteSharedAll()
Expand Down
8 changes: 0 additions & 8 deletions tcgmsg/examples/Makefile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ IF APOLLO
LIBS =
SCFBLAS = scfblas.o
ENDIF
IF CONVEX
FC = fc
FFLAGS = -O2
CC = cc
CFLAGS = -O -DCONVEX -I$(LIBDIR)
LIBS =
SCFBLAS =
ENDIF CONVEX
IF HPUX
FC = f77
CC = cc
Expand Down

0 comments on commit be5ef2c

Please sign in to comment.