diff --git a/armci/Makefile.am b/armci/Makefile.am index f4e077600..125577993 100644 --- a/armci/Makefile.am +++ b/armci/Makefile.am @@ -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) diff --git a/armci/README b/armci/README index 53edc36db..92f9f18d5 100644 --- a/armci/README +++ b/armci/README @@ -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 @@ -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) diff --git a/armci/src/collectives/message.c b/armci/src/collectives/message.c index 9fd30ae1c..43e47375a 100644 --- a/armci/src/collectives/message.c +++ b/armci/src/collectives/message.c @@ -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 @@ -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); @@ -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); @@ -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) diff --git a/armci/src/common/armci.c b/armci/src/common/armci.c index 9d1544fea..a66664b94 100644 --- a/armci/src/common/armci.c +++ b/armci/src/common/armci.c @@ -37,7 +37,7 @@ #if HAVE_STDARG_H # include #endif -#if defined(CRAY) && !defined(__crayx1) +#if defined(CRAY) # include # include # if HAVE_UNISTD_H @@ -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 @@ -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); @@ -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 diff --git a/armci/src/common/clusterinfo.c b/armci/src/common/clusterinfo.c index 226412842..832b6e2c8 100644 --- a/armci/src/common/clusterinfo.c +++ b/armci/src/common/clusterinfo.c @@ -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) { diff --git a/armci/src/common/gpc.c b/armci/src/common/gpc.c index 369edbce1..a9b34fa96 100644 --- a/armci/src/common/gpc.c +++ b/armci/src/common/gpc.c @@ -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; @@ -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; diff --git a/armci/src/common/pack.c b/armci/src/common/pack.c index 643eb52d7..7dc6e8e12 100644 --- a/armci/src/common/pack.c +++ b/armci/src/common/pack.c @@ -8,7 +8,7 @@ # include #endif -#if !defined(ACC_COPY) &&!defined(CRAY_YMP) &&!defined(CYGNUS)&&!defined(CYGWIN) +#if !defined(ACC_COPY) &&!defined(CYGNUS)&&!defined(CYGWIN) # define REMOTE_OP #endif diff --git a/armci/src/common/signaltrap.c b/armci/src/common/signaltrap.c index a02b44da2..29397c637 100644 --- a/armci/src/common/signaltrap.c +++ b/armci/src/common/signaltrap.c @@ -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 @@ -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 @@ -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); @@ -590,15 +590,6 @@ void ARMCI_ChildrenTrapSignals() TrapSigAbort(); TrapSigTerm(); TrapSigInt(); - -#if defined(SGI) - TrapSigIot(); -#endif - -#ifdef SGI - TrapSigXcpu(); -#endif - } diff --git a/armci/src/devices/sockets/sockets.c b/armci/src/devices/sockets/sockets.c index b98aabe71..4607a04ef 100644 --- a/armci/src/devices/sockets/sockets.c +++ b/armci/src/devices/sockets/sockets.c @@ -801,7 +801,7 @@ int armci_ListenAndAccept(int sock) return msgsock; } -#if !defined(SGI) && !defined(WIN32) +#if !defined(WIN32) struct hostent *gethostbyname(); #endif diff --git a/armci/src/include/armcip.h b/armci/src/include/armcip.h index 7a6a26722..ead86b747 100644 --- a/armci/src/include/armcip.h +++ b/armci/src/include/armcip.h @@ -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 @@ -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 @@ -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 diff --git a/armci/src/include/copy.h b/armci/src/include/copy.h index e894a932b..872afecfc 100644 --- a/armci/src/include/copy.h +++ b/armci/src/include/copy.h @@ -9,16 +9,9 @@ # include #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 @@ -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 @@ -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 #else @@ -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 diff --git a/armci/src/include/locks.h b/armci/src/include/locks.h index 583a09992..64bb40da1 100644 --- a/armci/src/include/locks.h +++ b/armci/src/include/locks.h @@ -45,40 +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 -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 -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); @@ -86,20 +57,12 @@ 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 -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 # if defined(CRAY) || defined(CRAY_XT) # include # endif -# if defined(LINUX64) || defined(__crayx1) || defined(CATAMOUNT) +# if defined(LINUX64) # define _INT_MIN_64 (LONG_MAX-1) # endif # undef NUM_LOCKS diff --git a/armci/src/include/semaphores.h b/armci/src/include/semaphores.h index 379f95466..4648bd176 100644 --- a/armci/src/include/semaphores.h +++ b/armci/src/include/semaphores.h @@ -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(); diff --git a/armci/src/include/spinlock.h b/armci/src/include/spinlock.h index a18074d7e..f785305d0 100644 --- a/armci/src/include/spinlock.h +++ b/armci/src/include/spinlock.h @@ -54,16 +54,6 @@ static int testandset(void *spinlock) { } # define TESTANDSET testandset -#elif defined(HPUX) && defined(__ia64) /* HPUX on IA64, non gcc */ -# if DEBUG_SPINLOCK -# warning SPINLOCK: HPUX ia64 -# endif -# define SPINLOCK -typedef unsigned int slock_t; -# include -# define TESTANDSET(lock) _Asm_xchg(_SZ_W, lock, 1, _LDHINT_NONE) -# define RELEASE_SPINLOCK(lock) (*((volatile LOCK_T *) (lock)) = 0) - #elif defined(__ia64) # if DEBUG_SPINLOCK # warning SPINLOCK: ia64 @@ -78,15 +68,6 @@ static int testandset(void *spinlock) { } # define TESTANDSET testandset -#elif defined(SGI) -# if DEBUG_SPINLOCK -# warning SPINLOCK: SGI -# endif -# include -# 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 @@ -109,16 +90,6 @@ static int testandset(void *spinlock) { #elif defined(MACX) -#elif defined(HPUX__) -# if DEBUG_SPINLOCK -# warning SPINLOCK: HPUX__ -# endif -extern int _acquire_lock(); -extern void _release_lock(); -# define SPINLOCK -# define TESTANDSET(x) (!_acquire_lock((x))) -# define RELEASE_SPINLOCK _release_lock - #elif defined(NEC) # if DEBUG_SPINLOCK # warning SPINLOCK: NEC diff --git a/armci/src/locks/locks.c b/armci/src/locks/locks.c index 90ba0de4b..65482b1d3 100644 --- a/armci/src/locks/locks.c +++ b/armci/src/locks/locks.c @@ -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; @@ -99,156 +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 -#include -#include -#include -#include -#include - -#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) 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 ********************************/ @@ -311,30 +137,6 @@ void unsetlock(int mutex) if(ReleaseMutex(mutex_arr[mutex])==FALSE)armci_die("unsetlock: failed",mutex); } - -#elif defined(CRAY_YMP) - -lock_t cri_l[NUM_LOCKS]; -#pragma _CRI common cri_l - -void CreateInitLocks(int num_locks, lockset_t *lockid) -{ - int i; - if(num_locks > NUM_LOCKS) armci_die("To many locks requested", num_locks); - - for(i=0;i> LOG_CALGN) << LOG_CALGN) -#ifdef CRAY_T3E -#pragma _CRI cache_align table -#endif + static memlock_t table[MAX_SLOTS]; -#if defined(SGIALTIX) || (defined(CRAY_SHMEM) && defined(CRAY_XT)) +#if (defined(CRAY_SHMEM) && defined(CRAY_XT)) #define MAX_SEGS 512 armci_memoffset_t armci_memoffset_table[MAX_SEGS]; static short int seg_count=0; @@ -60,7 +58,7 @@ static short int new_seg=0; \*/ void armci_lockmem_(void *pstart, void *pend, 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; @@ -81,7 +79,7 @@ void armci_lockmem_(void *pstart, void *pend, int proc) void armci_unlockmem_(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; @@ -103,10 +101,6 @@ int i=factor*100000; armci_dummy_work = armci_dummy_work + 1./(double)i; } } - -#ifdef SGIALTIX -#include -#endif /*\ acquire exclusive LOCK to MEMORY area owned by process "proc" * . only one area can be locked at a time by the calling process @@ -118,7 +112,7 @@ void armci_lockmem(void *start, void *end, int proc) register int slot, avail=0; int turn=0, conflict=0; memlock_t *memlock_table; -#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; @@ -131,7 +125,6 @@ void armci_lockmem(void *start, void *end, int proc) return; } -# ifndef SGIALTIX /* when processes are attached to a shmem region at different addresses, * addresses written to memlock table must be adjusted to the node master */ @@ -139,7 +132,6 @@ void armci_lockmem(void *start, void *end, int proc) start = armci_mem_offset + (char*)start; end = armci_mem_offset + (char*)end; } -# endif #endif if(DEBUG_){ @@ -167,37 +159,6 @@ void armci_lockmem(void *start, void *end, int proc) pend = (char*)pstart + bytes; } #endif -#ifdef SGIALTIX - if (proc == armci_me) { - pstart = shmem_ptr(pstart,armci_me); - pend = shmem_ptr(pend,armci_me); - } - /* In SGI Altix processes are attached to a shmem region at different - addresses. Addresses written to memlock table must be adjusted to - the node master - */ - if(ARMCI_Uses_shm()){ - int i, seg_id=-1; - size_t tile_size,offset; - void *start_addr, *end_addr; - for(i=0; i=start_addr && pend<=end_addr) {seg_id=i; break;}*/ - if(pstart >= start_addr && pstart <= end_addr) {seg_id=i; break;} - } - if(seg_id==-1) armci_die("armci_lockmem: Invalid segment", seg_id); - - offset = armci_memoffset_table[seg_id].mem_offset; - pstart = ((char*)pstart + offset); - pend = ((char*)pend + offset); - } -#endif while(1){ NATIVE_LOCK(lock,proc); @@ -311,56 +272,6 @@ void armci_set_mem_offset(void *ptr) } } -#ifdef SGIALTIX -/* SGI Altix Stuff */ -static void armci_altix_gettilesize(void *ptr, void **ptr_arr, - size_t *tile_size) { - int i; - size_t diff=0; - for(i=0; i0) diff = (size_t)((char*)ptr_arr[i]-(char*)ptr_arr[i-1]); - if(i>1 && diff!=*tile_size) - armci_die("armci_memoffset_table_newentry:Inconsistent tile size", - armci_me); - *tile_size = diff; - } -} - -void armci_memoffset_table_newentry(void *ptr, size_t seg_size) { - - void **ptr_arr; - void *master_addr = NULL; - size_t tile_size=0, offset=0; - - if(!ptr) armci_die("armci_memoffset_table_newentry : null ptr",0); - - if(seg_count >= MAX_SEGS) /* CHECK: make it dynamic */ - armci_die("armci_altix_allocate: Increase MAX_SEGS > 512", armci_me); - - if(armci_me == armci_master) master_addr = shmem_ptr(ptr, armci_me); - armci_msg_brdcst(&master_addr, sizeof(void*), armci_master); - - ptr_arr = (void**)malloc(armci_nproc*sizeof(void*)); - armci_altix_gettilesize(ptr, ptr_arr, &tile_size); - offset = (size_t)((char*)master_addr - (char*)ptr_arr[armci_master]); - - /* enter in memoffset table */ - armci_memoffset_table[seg_count].seg_addr = ptr_arr[armci_master]; - armci_memoffset_table[seg_count].seg_size = seg_size; - armci_memoffset_table[seg_count].tile_size = tile_size; - armci_memoffset_table[seg_count].mem_offset = offset; - -#if DEBUG_ - printf("%d: addr=%p seg_size=%ld tile_size=%ld offset=%ld\n", armci_me, - ptr_arr[armci_master], seg_size, tile_size, offset); -#endif - - ++seg_count; - free(ptr_arr); -} -#endif - #if defined(CRAY_SHMEM) && defined(CRAY_XT) /* CRAY-CRAY_XT stuff */ static void armci_cray_gettilesize(void *ptr, void **ptr_arr, diff --git a/armci/src/memory/memory.c b/armci/src/memory/memory.c index a9f5dc380..6e6832e28 100644 --- a/armci/src/memory/memory.c +++ b/armci/src/memory/memory.c @@ -23,9 +23,6 @@ extern void armci_shmalloc_exchange_address(void **ptr_arr); extern void armci_shmalloc_exchange_offsets(context_t *); # if defined(CRAY_XT) # include -# ifdef CATAMOUNT -# include -# endif # endif #endif @@ -46,110 +43,6 @@ static context_t ctx_mlocalmem; extern int _armci_server_started; #endif -/**************************************************************************** - * Memory Allocator called by kr_malloc on SGI Altix to get more core from OS - */ -#ifdef SGIALTIX - -#include -#if HAVE_UNISTD_H -# include -#endif - -#define DEF_UNITS (64) -#define MAX_SEGS 512 - -#define _SHMMAX_ALTIX 32*1024 /* 32 MB */ -#define _SHMMAX_ALTIX_GRP 512*1024 /* 512 MB */ - -static context_t altix_ctx_shmem; -static context_t altix_ctx_shmem_grp; -static size_t altix_pagesize; -extern void armci_memoffset_table_newentry(void *ptr, size_t seg_size); - -void *armci_altix_allocate(size_t bytes) -{ - void *ptr, *sptr; - ARMCI_PR_DBG("enter",0); - sptr=ptr= shmalloc(bytes); - if(sptr == NULL) armci_die("armci_altix_allocate: shmalloc failed\n", - armci_me); - armci_memoffset_table_newentry(ptr, bytes); -#if 0 - if(ptr){ /* touch each page to establish ownership */ - int i; - for(i=0; i< bytes/altix_pagesize; i++){ - *(double*)ptr=0.; - ((char*)ptr) += altix_pagesize; - } - } -#endif - ARMCI_PR_DBG("exit",0); - return sptr; -} - -void armci_altix_shm_init() -{ - ARMCI_PR_DBG("enter",0); - altix_pagesize = getpagesize(); - kr_malloc_init(SHM_UNIT, _SHMMAX_ALTIX, 0, - armci_altix_allocate, 0, &altix_ctx_shmem); - kr_malloc_init(SHM_UNIT, _SHMMAX_ALTIX_GRP, _SHMMAX_ALTIX_GRP, - armci_altix_allocate, 0, &altix_ctx_shmem_grp); - /* allocate a huge segment for groups. When kr_malloc() is called for - the first time for this altix_ctx_shmem_grp context with some minimal - size of 8 bytes, a huge segment of size (SHM_UNIT*_SHMMAX_ALTIX_GRP) - will be created */ - { - void *ptr; - ptr=kr_malloc((size_t)8, &altix_ctx_shmem_grp); - if(ptr==NULL) - armci_die("armci_altix_shm_init(): malloc failed", armci_me); - } - ARMCI_PR_DBG("exit",0); -} - -void armci_altix_shm_malloc(void *ptr_arr[], armci_size_t bytes) -{ - long size=bytes; - void *ptr; - int i; - ARMCI_PR_DBG("enter",0); - armci_msg_lgop(&size,1,"max"); - ptr=kr_malloc((size_t)size, &altix_ctx_shmem); - bzero(ptr_arr,(armci_nproc)*sizeof(void*)); - ptr_arr[armci_me] = ptr; - if(size!=0 && ptr==NULL) - armci_die("armci_altix_shm_malloc(): malloc failed", armci_me); - for(i=0; i< armci_nproc; i++) if(i!=armci_me) ptr_arr[i]=shmem_ptr(ptr,i); - ARMCI_PR_DBG("exit",0); -} - -#ifdef MSG_COMMS_MPI -void armci_altix_shm_malloc_group(void *ptr_arr[], armci_size_t bytes, - ARMCI_Group *group) { - long size=bytes; - void *ptr; - int i,grp_me, grp_nproc; - armci_grp_attr_t *grp_attr=ARMCI_Group_getattr(group); - ARMCI_PR_DBG("enter",0); - - ARMCI_Group_size(group, &grp_nproc); - ARMCI_Group_rank(group, &grp_me); - armci_msg_group_lgop(&size,1,"max",group); - ptr=kr_malloc((size_t)size, &altix_ctx_shmem_grp); - if(size!=0 && ptr==NULL) - armci_die("armci_altix_shm_malloc_group(): malloc failed for groups. Increase _SHMMAX_ALTIX_GRP", armci_me); - bzero(ptr_arr,(grp_nproc)*sizeof(void*)); - ptr_arr[grp_me] = ptr; - for(i=0; i< grp_nproc; i++) if(i!=grp_me) ptr_arr[i]=shmem_ptr(ptr,ARMCI_Absolute_id(group, i)); - ARMCI_PR_DBG("exit",0); -} -#endif - -#endif /* end ifdef SGIALTIX */ -/* ------------------ End Altix memory allocator ----------------- */ - void kr_check_local() { #if 0 @@ -711,12 +604,8 @@ void armci_krmalloc_init_localmem() { kr_malloc_init(0, 0, 0, malloc, 0, &ctx_mlocalmem); ctx_mlocalmem.ctx_type = KR_CTX_LOCALMEM; #elif defined(CRAY_SHMEM) && defined(CRAY_XT) -# ifdef CATAMOUNT - int units_avail = (cnos_shmem_size() - 1024 * 1024) / SHM_UNIT; -# else extern size_t get_xt_heapsize(); int units_avail = (get_xt_heapsize() - 1024 * 1024) / SHM_UNIT; -# endif if(DEBUG_) { @@ -853,11 +742,7 @@ int PARMCI_Malloc(void *ptr_arr[], armci_size_t bytes) } # endif -# ifdef SGIALTIX - if( ARMCI_Uses_shm() ) armci_altix_shm_malloc(ptr_arr,bytes); -# else if( ARMCI_Uses_shm() ) armci_shmem_malloc(ptr_arr,bytes); -# endif else { /* on distributed-memory systems just malloc & collect all addresses */ ptr = kr_malloc(bytes, &ctx_localmem); @@ -900,7 +785,6 @@ int PARMCI_Free(void *ptr) ARMCI_PR_DBG("enter",0); if(!ptr)return 1; -#ifndef SGIALTIX # ifdef REGION_ALLOC kr_free(ptr, &ctx_region_shmem); # else @@ -925,15 +809,10 @@ int PARMCI_Free(void *ptr) # endif kr_free(ptr, &ctx_localmem); # endif /* REGION_ALLOC */ -#else - /* Altix */ - if( ARMCI_Uses_shm() ) kr_free(ptr, &altix_ctx_shmem); - else kr_free(ptr, &ctx_localmem); -#endif - ptr = NULL; + ptr = NULL; ARMCI_PR_DBG("exit",0); - return 0; + return 0; } int PARMCI_Free_memdev(void *ptr) @@ -1017,11 +896,7 @@ int ARMCI_Malloc_group(void *ptr_arr[], armci_size_t bytes, #endif if( ARMCI_Uses_shm_grp(group) ) { -# ifdef SGIALTIX - armci_altix_shm_malloc_group(ptr_arr,bytes,group); -# else - armci_shmem_malloc_group(ptr_arr,bytes,group); -# endif + armci_shmem_malloc_group(ptr_arr,bytes,group); } else { /* on distributed-memory systems just malloc & collect all addresses */ @@ -1081,7 +956,6 @@ int ARMCI_Free_group(void *ptr, ARMCI_Group *group) grp_clus_me = grp_attr->grp_clus_me; grp_master = grp_attr->grp_clus_info[grp_clus_me].master; -#ifndef SGIALTIX #ifdef REGION_ALLOC kr_free(ptr, &ctx_region_shmem); #else @@ -1105,12 +979,6 @@ int ARMCI_Free_group(void *ptr, ARMCI_Group *group) # endif kr_free(ptr, &ctx_localmem); #endif /* ifdef REGION_ALLOC */ -#else /* SGI Altix */ - if(ARMCI_Uses_shm_grp(group)) - kr_free(ptr, &altix_ctx_shmem_grp); - else kr_free(ptr, &ctx_localmem); - -#endif /* SGIALTIX */ ptr = NULL; ARMCI_PR_DBG("exit",0); diff --git a/armci/src/memory/shmem.c b/armci/src/memory/shmem.c index cbf4f6f2d..12c3aafa0 100644 --- a/armci/src/memory/shmem.c +++ b/armci/src/memory/shmem.c @@ -109,18 +109,12 @@ #if defined(SUN)||defined(SOLARIS) # undef _SHMMAX # define _SHMMAX (1024) /* memory in KB */ -#elif defined(SGI64) || defined(AIX) || defined(CONVEX) +#elif defined(AIX) # undef _SHMMAX # define _SHMMAX ((unsigned long)512*1024) -#elif defined(SGI) && !defined(SGI64) -# undef _SHMMAX -# define _SHMMAX ((unsigned long)128*1024) #elif defined(KSR) # undef _SHMMAX # define _SHMMAX ((unsigned long)512*1024) -#elif defined(HPUX) -# undef _SHMMAX -# define _SHMMAX ((unsigned long)64*1024) #elif defined(__FreeBSD__) # undef _SHMMAX # define _SHMMAX ((unsigned long)3*1024) @@ -159,8 +153,6 @@ static int id_search_no_fork=0; #define CLEANUP_CMD(command) sprintf(command,"/usr/bin/ipcrm shm %d",id); #elif defined(SOLARIS) #define CLEANUP_CMD(command) sprintf(command,"/bin/ipcrm -m %d",id); -#elif defined(SGI) -#define CLEANUP_CMD(command) sprintf(command,"/usr/sbin/ipcrm -m %d",id); #else #define CLEANUP_CMD(command) sprintf(command,"/usr/bin/ipcrm -m %d",id); #endif @@ -973,7 +965,7 @@ char *pref_addr = (char*)0; printf("%d:allocate:attach:id=%d paddr=%p size=%ld\n",armci_me,id,temp,size); fflush(stdout); } -#if !defined(AIX) && !defined(HPUX64) +#if !defined(AIX) /* delete segment id so that OS cleans it when all attached processes are gone */ if(shmctl( id, IPC_RMID, (struct shmid_ds *)NULL)) fprintf(stderr,"failed to remove shm id=%d\n",id); diff --git a/armci/src/memory/shmlimit.c b/armci/src/memory/shmlimit.c index 8f9c7389e..dd2a9b6f3 100644 --- a/armci/src/memory/shmlimit.c +++ b/armci/src/memory/shmlimit.c @@ -37,7 +37,7 @@ #define DEBUG_ 0 -#if defined(SOLARIS64) || defined(HPUX) +#if defined(SOLARIS64) #define PIPE_AFTER_FORK_BUG #endif diff --git a/armci/src/xfer/rmw.c b/armci/src/xfer/rmw.c index 15a956137..7a2e13be5 100644 --- a/armci/src/xfer/rmw.c +++ b/armci/src/xfer/rmw.c @@ -28,7 +28,7 @@ long _a_ltemp; void armci_generic_rmw(int op, void *ploc, void *prem, int extra, 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; diff --git a/armci/src/xfer/strided.c b/armci/src/xfer/strided.c index ad411b684..b61c949b5 100644 --- a/armci/src/xfer/strided.c +++ b/armci/src/xfer/strided.c @@ -130,12 +130,7 @@ int armci_iwork[MAX_STRIDE_LEVEL]; static void armci_copy_2D(int op, int proc, void *src_ptr, void *dst_ptr, int bytes, int count, int src_stride, int dst_stride) { - -#ifdef __crayx1 - int shmem = 1; -#else int shmem = SAMECLUSNODE(proc); -#endif if(shmem) { @@ -148,23 +143,7 @@ static void armci_copy_2D(int op, int proc, void *src_ptr, void *dst_ptr, }else { if(bytes < THRESH){ /* low-latency copy for small data segments */ -#if defined(__crayx1) - if( !(bytes%sizeof(float)) ) { - float *ps=(float*)src_ptr; - float *pd=(float*)dst_ptr; - long fsstride = src_stride/sizeof(float); - long fdstride = dst_stride/sizeof(float); - int j; - - for (j = 0; j < count; j++){ - int i; -#pragma _CRI concurrent - for(i=0;i MAX_STRIDE_LEVEL) return FAIL4; if(proc<0)return FAIL5; -#ifdef __crayx1 - if(!stride_levels) { - memcpy(dst_ptr, src_ptr,count[0]); - return 0; - } -#endif - PREPROCESS_STRIDED(tmp_count); # if defined(PACKPUT) direct=SAMECLUSNODE(proc); @@ -919,12 +891,8 @@ int PARMCI_Put_flag(void *src, void* dst,int bytes,int *f,int v,int proc) { int PARMCI_Get(void *src, void* dst, int bytes, int proc) { int rc=0; -#ifdef __crayx1 - memcpy(dst,src,bytes); -#else rc = PARMCI_GetS(src, NULL, dst, NULL, &bytes, 0, proc); -#endif - + dassert(1,rc==0); return rc; } @@ -1251,7 +1219,7 @@ int PARMCI_NbAccS( int optype, /* operation */ } -#if !defined(ACC_COPY)&&!defined(CRAY_YMP)&&!defined(CYGNUS)&&!defined(CYGWIN) +#if !defined(ACC_COPY)&&!defined(CYGNUS)&&!defined(CYGWIN) # define REMOTE_OP #endif diff --git a/armci/testing/clone.c b/armci/testing/clone.c deleted file mode 100644 index 8ca7a596d..000000000 --- a/armci/testing/clone.c +++ /dev/null @@ -1,94 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include - -#define FORK_BEFORE_NI_INIT -#ifndef FORK_BEFORE_NI_INIT -#define FORK_AFTER_NI_INIT -#endif - -char child_stack[256*1024]; -char *child_stack_top = &child_stack[256*1024-1]; -int iv; - -int -server(void *arg) -{ - - int ret; - int num_interfaces; - ptl_handle_ni_t nih; - ptl_handle_eq_t eqh; - ptl_ni_limits_t ptl_limits; - ptl_event_t ev_t; - ptl_event_t *ev = &ev_t; - - - printf("IN SERVER\n"); - - if ((ret = PtlInit(&num_interfaces)) != PTL_OK) { - printf("%s: PtlInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlInit succeeds (%d:%d)\n", FUNCTION_NAME, ret, num_interfaces); - - if (((ret = PtlNIInit( - IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) && (ret != PTL_IFACE_DUP)) { - printf("%s: PtlNIInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlNIInit succeeds (%d)\n", FUNCTION_NAME, ret); - - if ((ret = PtlEQAlloc(nih, 4096, NULL, &eqh)) != PTL_OK) { - printf("%s: PtlEQAlloc failed: %d\n", - FUNCTION_NAME, ret); - exit(1); - } - iv = 11; - ret = PtlEQWait(nih, ev); - printf("%s: PtlEQAlloc succeeds\n", FUNCTION_NAME); - printf("%d\n", iv); - iv = 13; - - while (1); -} - -int -main(int argc, char **argv, char **envp) -{ - int ret; - pid_t child; - int status; - iv = 12; - - child = clone(server, (void *)child_stack_top, - CLONE_THREAD | CLONE_SIGHAND | CLONE_VM, NULL); - - if (child == -1) { - perror("clone"); - exit(1); - } - printf("clone returns...(ret=%d)\n", child); - while (iv != 11); - printf("\nbetween after %d\n", iv); - - - MPI_Init(&argc, &argv); - MPI_Barrier(MPI_COMM_WORLD); - MPI_Finalize(); - - printf("waiting...\n"); - waitpid(-1, &status, __WALL); - printf("\nafter %d\n", iv); - printf("done (%d)\n", status); -} - diff --git a/armci/testing/fork.c b/armci/testing/fork.c deleted file mode 100644 index 4f0b19e04..000000000 --- a/armci/testing/fork.c +++ /dev/null @@ -1,83 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include - -#include -#include -#include - -int -main(int argc, char **argv, char **envp) -{ - int i, ret, npes; - int num_interfaces; - ptl_handle_ni_t nih; - ptl_handle_eq_t eqh; - ptl_ni_limits_t ptl_limits; - pid_t child; - ptl_process_id_t rnk; - - child = fork(); - if ((ret = PtlInit(&num_interfaces)) != PTL_OK) { - printf("%s: PtlInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlInit succeeds (%d)\n", FUNCTION_NAME, ret); - - - if ((ret = PtlNIInit( - IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) { - printf("%s: PtlNIInit 1 failed: %d\n", FUNCTION_NAME, ret); - } - - if ((ret = PtlNIFini(nih)) != PTL_OK) { - printf("%s: PtlNIFini failed: %d\n", FUNCTION_NAME, ret); - } - PtlFini(); - - if ((ret = PtlInit(&num_interfaces)) != PTL_OK) { - printf("%s: PtlInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - if ((ret = PtlNIInit( - IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) { - printf("%s: PtlNIInit 2 failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } -#if 0 - if ((ret = PtlNIInit( - IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) { - printf("%s: PtlNIInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } -#endif - printf("%s: PtlNIInit succeeds (%d)\n", FUNCTION_NAME, ret); - - if ((ret = PtlEQAlloc(nih, 4096, NULL, &eqh)) != PTL_OK) { - printf("%s: PtlEQAlloc failed: %d(%d)\n", - FUNCTION_NAME, ret, child); - exit(1); - } - printf("%s: PtlEQAlloc succeeds (%d:%d)\n", FUNCTION_NAME, child, ret); - - - if ((ret = PtlGetId(nih, &rnk)) != PTL_OK) { - printf("%s: PtlGetId failed: %d(%d)\n", - FUNCTION_NAME, ret, child); - exit(1); - } - printf("%s: nid=%d pid=%d(%d)\n", FUNCTION_NAME, rnk.nid, rnk.pid, child); - - if (child) { - MPI_Init(&argc, &argv); - MPI_Finalize(); - printf("%s: mpi_init and finalize succeed(%d)\n", FUNCTION_NAME, child); - } -} diff --git a/armci/testing/origptl.c b/armci/testing/origptl.c deleted file mode 100644 index f9501a9ef..000000000 --- a/armci/testing/origptl.c +++ /dev/null @@ -1,58 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#define FORK_BEFORE_NI_INIT -#ifndef FORK_BEFORE_NI_INIT -#define FORK_AFTER_NI_INIT -#endif - -int -main(int argc, char **argv, char **envp) -{ - int ret; - int num_interfaces; - ptl_handle_ni_t nih; - ptl_handle_eq_t eqh; - ptl_ni_limits_t ptl_limits; - pid_t child; - - if ((ret = PtlInit(&num_interfaces)) != PTL_OK) { - printf("%s: PtlInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlInit succeeds (%d)\n", FUNCTION_NAME, ret); - -#ifdef FORK_BEFORE_NI_INIT - child = fork(); -#endif - if ((ret = PtlNIInit( - IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) { - printf("%s: PtlNIInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlNIInit succeeds (%d)\n", FUNCTION_NAME, ret); - -#ifdef FORK_AFTER_NI_INIT - child = fork(); -#endif - if ((ret = PtlEQAlloc(nih, 4096, NULL, &eqh)) != PTL_OK) { - printf("%s: PtlEQAlloc failed: %d(%d)\n", - FUNCTION_NAME, ret, child); - exit(1); - } - printf("%s: PtlEQAlloc succeeds (%d:%d)\n", FUNCTION_NAME, child, ret); - if (child) { - MPI_Init(&argc, &argv); - MPI_Finalize(); - } -} - diff --git a/armci/testing/ptltest.c b/armci/testing/ptltest.c deleted file mode 100644 index 99e9ced67..000000000 --- a/armci/testing/ptltest.c +++ /dev/null @@ -1,102 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#define FORK_BEFORE_NI_INIT -#ifndef FORK_BEFORE_NI_INIT -#define FORK_AFTER_NI_INIT -#endif - - -#ifndef PMI_SUCCESS -#define PMI_SUCCESS 0 -#endif -extern int PMI_CNOS_Get_nidpid_map(void **); -int -main(int argc, char **argv, char **envp) -{ - int i, ret, *npes; - int num_interfaces; - ptl_handle_ni_t nih; - ptl_handle_eq_t eqh; - ptl_ni_limits_t ptl_limits; - pid_t child; - ptl_process_id_t rnk, *procid_map; - int spv, *spawned = &spv; - - - if ((ret = PtlInit(&num_interfaces)) != PTL_OK) { - printf("%s: PtlInit failed: %d\n", FUNCTION_NAME, ret); - exit(1); - } - printf("%s: PtlInit succeeds (%d)\n", FUNCTION_NAME, ret); - -#ifdef FORK_BEFORE_NI_INIT - child = fork(); -#endif - - if ((ret = PtlNIInit(IFACE_FROM_BRIDGE_AND_NALID(PTL_BRIDGE_UK, PTL_IFACE_SS), - PTL_PID_ANY, NULL, &ptl_limits, &nih)) != PTL_OK) { - printf("%s: PtlNIInit failed: %d\n", FUNCTION_NAME, ret); - /*exit(1);*/ - } - else { - printf("%s: PtlNIInit succeeds (%d)\n", FUNCTION_NAME, ret); - } - -#ifdef FORK_AFTER_NI_INIT - child = fork(); -#endif - - if ((ret = PtlEQAlloc(nih, 4096, NULL, &eqh)) != PTL_OK) { - printf("%s: PtlEQAlloc failed: %d(%d)\n", - FUNCTION_NAME, ret, child); - exit(1); - } - printf("%s: PtlEQAlloc succeeds (%d:%d)\n", FUNCTION_NAME, child, ret); - -#if 1 - if (child) { - MPI_Init(&argc, &argv); - } - - if (child) { - PMI_Init(spawned); - printf("\n%d:spanwned=%d", child, *spawned); - if ((ret = PMI_Get_size(npes)) != PMI_SUCCESS) { - printf("%s: PMI_Get_size failed: %d\n", FUNCTION_NAME, ret); - /*exit(1);*/ - } - else { - printf("%s: PMI_Get_size succeeds (%d)\n", FUNCTION_NAME, *npes); - } - /*procid_map = (ptl_process_id_t *)malloc(sizeof(ptl_process_id_t)*(*npes)); - if(procid_map==NULL)exit(1);*/ - if ((ret = PMI_CNOS_Get_nidpid_map(&procid_map)) != PMI_SUCCESS) { - printf("Getting proc map failed (npes=%d)\n", *npes); - } - for (i = 0; i < *npes; i++) { - printf("\npid=%d nid=%d npes=%d(%d)", procid_map[i].pid, procid_map[i].nid, *npes, child); - } - } -#endif - - if ((ret = PtlGetId(nih, &rnk)) != PTL_OK) { - printf("%s: PtlGetId failed: %d(%d)\n", - FUNCTION_NAME, ret, child); - exit(1); - } - printf("%s: nid=%d pid=%d(%d)\n", FUNCTION_NAME, rnk.nid, rnk.pid, child); - if (child) { - MPI_Finalize(); - printf("%s: mpi_init and finalize succeed(%d)\n", FUNCTION_NAME, child); - } - -} diff --git a/armci/testing/te.c b/armci/testing/te.c deleted file mode 100644 index e1a09d3dd..000000000 --- a/armci/testing/te.c +++ /dev/null @@ -1,48 +0,0 @@ -#if HAVE_CONFIG_H -# include "config.h" -#endif - - -#include -#include -#include -#include -#include -#include - - -#include -#include -#include - -int variable, fd; - -int do_something() -{ - variable = 42; - close(fd); - _exit(0); -} - -int main(int argc, char *argv[]) -{ - void **child_stack; - char tempch; - - variable = 9; - fd = open("test.file", O_RDONLY); - child_stack = (void **) malloc(16384); - printf("The variable was %d\n", variable); - - clone(do_something, child_stack, CLONE_VM | CLONE_FILES, NULL); - sleep(1); - - printf("The variable is now %d\n", variable); - if (read(fd, &tempch, 1) < 1) { - perror("File Read Error"); - exit(1); - } - printf("We could read from the file\n"); - return 0; -} - diff --git a/cmake/mafdecls.fh.in b/cmake/mafdecls.fh.in index 0f4ded0df..e90cf9473 100644 --- a/cmake/mafdecls.fh.in +++ b/cmake/mafdecls.fh.in @@ -124,60 +124,36 @@ ! variables ! -#ifdef HPUX -# define HP_SHARED_COMMON_ -#endif ! common blocks #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_byte -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_byte/ #endif common /mbc_byte/ byte_mb(2) character*1 byte_mb #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_int -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_int/ #endif common /mbc_int/ int_mb(2) integer int_mb -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_log/ -#endif common /mbc_log/ log_mb(2) logical log_mb #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_real -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_real/ #endif common /mbc_real/ real_mb(2) real real_mb #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_dbl -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_dbl/ #endif common /mbc_dbl/ dbl_mb(2) double precision dbl_mb #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_scpl -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_scpl/ #endif common /mbc_scpl/ scpl_mb(2) complex scpl_mb #ifdef INTEL_64ALIGN !DIR$ ATTRIBUTES ALIGN : 64 :: mbc_dcpl -#endif -#ifdef HP_SHARED_COMMON -*$HP$ shared_common /mbc_dcpl/ #endif common /mbc_dcpl/ dcpl_mb(2) double complex dcpl_mb diff --git a/comex/m4/comex_blas.m4 b/comex/m4/comex_blas.m4 index 10e681bd7..c56213608 100644 --- a/comex/m4/comex_blas.m4 +++ b/comex/m4/comex_blas.m4 @@ -281,26 +281,6 @@ AS_IF([test $comex_blas_ok = no], LIBS="$comex_save_LIBS"]) AC_MSG_RESULT([$comex_blas_ok])]) -# SCSL library (SCSL stands for SGI/Cray Scientific Library) -AS_IF([test $comex_blas_ok = no], - [AC_MSG_CHECKING([for BLAS in SGI/Cray Scientific Library]) - # add -lscs to BLAS_LIBS if missing from LIBS - AS_CASE([$LIBS], [*scs*], [], [BLAS_LIBS="-lscs"]) - LIBS="$BLAS_LIBS $LIBS" - COMEX_RUN_BLAS_TEST() - LIBS="$comex_save_LIBS" - AC_MSG_RESULT([$comex_blas_ok])]) - -# SGIMATH library -AS_IF([test $comex_blas_ok = no], - [AC_MSG_CHECKING([for BLAS in SGIMATH library]) - # add -lcomplib.sgimath to BLAS_LIBS if missing from LIBS - AS_CASE([$LIBS], [*complib.sgimath*], [], [BLAS_LIBS="-lcomplib.sgimath"]) - LIBS="$BLAS_LIBS $LIBS" - COMEX_RUN_BLAS_TEST() - LIBS="$comex_save_LIBS" - AC_MSG_RESULT([$comex_blas_ok])]) - # IBM ESSL library (might require generic BLAS lib, too) AS_IF([test $comex_blas_ok = no], [AC_MSG_CHECKING([for BLAS in IBM ESSL library]) diff --git a/comex/src-dmapp/clusterinfo.c b/comex/src-dmapp/clusterinfo.c index 36f670471..6db3c271e 100644 --- a/comex/src-dmapp/clusterinfo.c +++ b/comex/src-dmapp/clusterinfo.c @@ -42,13 +42,7 @@ int armci_master; int armci_clus_first; int armci_clus_last; -#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) { diff --git a/global/README b/global/README index ee83da474..43bec1835 100644 --- a/global/README +++ b/global/README @@ -57,13 +57,6 @@ TEST PROGRAM NOTES or under control of your favorite debugger. - On MPP like T3D, IBM SP, and Intel machines, use appropriate system - command to specify the number of processors, load and run the - programs. For example, to run on four processors of the Cray T3D - use:: - - mppexec testing/test.x -npes 4 - DOCUMENTATION ============= The documentation is located in doc/ and on the web at: diff --git a/global/examples/md_cluster/tstats.F b/global/examples/md_cluster/tstats.F index d5ef32376..a729be0f6 100644 --- a/global/examples/md_cluster/tstats.F +++ b/global/examples/md_cluster/tstats.F @@ -11,8 +11,6 @@ function wraptime() c It is designed to minimize the effort required to c convert the timing statistics in going from one c machine to another. -c -c SGI c wraptime = dble(etime(tarray)) #else diff --git a/global/src/base.c b/global/src/base.c index f2529fb4e..f9ca9e130 100644 --- a/global/src/base.c +++ b/global/src/base.c @@ -168,7 +168,6 @@ int ga_spare_procs; #define ga_ComputeIndexM(_index, _ndim, _subscript, _dims) \ { \ Integer _i, _factor=1; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_i=0,*(_index)=0; _i<_ndim; _i++){ \ *(_index) += _subscript[_i]*_factor; \ if(_i<_ndim-1)_factor *= _dims[_i]; \ @@ -181,7 +180,6 @@ int ga_spare_procs; #define ga_UpdateSubscriptM(_ndim, _subscript, _lo, _hi, _dims)\ { \ Integer _i; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_i=0; _i<_ndim; _i++){ \ if(_subscript[_i] < _hi[_i]) { _subscript[_i]++; break;} \ _subscript[_i] = _lo[_i]; \ @@ -195,7 +193,6 @@ int ga_spare_procs; { \ Integer _i; \ *_elems = 1; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_i=0; _i<_ndim; _i++){ \ *_elems *= _hi[_i]-_lo[_i] +1; \ _subscript[_i] = _lo[_i]; \ @@ -669,7 +666,6 @@ void pnga_initialize_ltd(Integer mem_limit) {\ int _d;\ if(ndim<1||ndim>MAXDIM) pnga_error("unsupported number of dimensions",ndim);\ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_d=0; _d _nb - 1 || proc<0){ \ - __CRAYX1_PRAGMA("_CRI novector"); \ - for(_d=0; _d<_dim; _d++){ \ + for(_d=0; _d<_dim; _d++){ \ lo[_d] = (Integer)0; \ hi[_d] = (Integer)-1;} \ } \ else{ \ _index = proc; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_d=0; _d<_dim; _d++){ \ _loc = _index% (Integer)nblock[_d]; \ _index /= (Integer)nblock[_d]; \ @@ -329,7 +321,6 @@ extern MPI_Comm GA_MPI_World_comm_dup; #define gam_setstride(ndim, size, ld, ldrem, stride_rem, stride_loc){\ int _i; \ stride_rem[0]= stride_loc[0] = (int)size; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_i=0;_i hi[_d]){ \ char err_string[ERR_STR_LEN]; \ diff --git a/global/src/diag.fh b/global/src/diag.fh index 0359494f8..5f154c9b3 100644 --- a/global/src/diag.fh +++ b/global/src/diag.fh @@ -4,7 +4,7 @@ c problem size: c - first group are MPPs c - second group are (multiprocessor) workstations c -#if defined(KSR)||defined(CRAY_T3D)||defined(NX)||defined(SP1)||defined(SP) +#if defined(KSR)||defined(NX)||defined(SP1)||defined(SP) # define SIZE1 200 # define SIZE2 400 # define SIZE3 800 diff --git a/global/src/ga_iterator.h b/global/src/ga_iterator.h index 4ef4aeafe..c66fbb416 100644 --- a/global/src/ga_iterator.h +++ b/global/src/ga_iterator.h @@ -117,7 +117,6 @@ typedef struct { #define gam_setstride(ndim, size, ld, ldrem, stride_rem, stride_loc){\ int _i; \ stride_rem[0]= stride_loc[0] = (int)size; \ - __CRAYX1_PRAGMA("_CRI novector"); \ for(_i=0;_i # define sleep(x) Sleep(1000*(x)) @@ -128,11 +124,7 @@ extern char ***_ga_argv; #define PERIODIC_ACC 3 #define FLUSH_CACHE -#ifdef CRAY_T3D -# define ALLIGN_SIZE 32 -#else -# define ALLIGN_SIZE 128 -#endif +#define ALLIGN_SIZE 128 #define allign__(n, SIZE) (((n)%SIZE) ? (n)+SIZE - (n)%SIZE: (n)) #define allign_size(n) allign__((long)(n), ALLIGN_SIZE) diff --git a/global/src/iterator.c b/global/src/iterator.c index 9dd664b64..896dd5583 100644 --- a/global/src/iterator.c +++ b/global/src/iterator.c @@ -115,7 +115,6 @@ ga_ownsM(g_handle, proc, _lo, _hi); \ gaCheckSubscriptM(subscript, _lo, _hi, GA[g_handle].ndim); \ if(_last==0) ld[0]=_hi[0]- _lo[0]+1+2*(Integer)GA[g_handle].width[0]; \ - __CRAYX1_PRAGMA("_CRI shortloop"); \ for(_d=0; _d < _last; _d++) { \ _w = (Integer)GA[g_handle].width[_d]; \ _offset += (subscript[_d]-_lo[_d]+_w) * _factor; \ @@ -147,7 +146,6 @@ void gam_LocationF(int proc, Integer g_handle, Integer subscript[], ga_ownsM(g_handle, proc, _lo, _hi); gaCheckSubscriptM(subscript, _lo, _hi, GA[g_handle].ndim); if(_last==0) ld[0]=_hi[0]- _lo[0]+1+2*(Integer)GA[g_handle].width[0]; - __CRAYX1_PRAGMA("_CRI shortloop"); for(_d=0; _d < _last; _d++) { _w = (Integer)GA[g_handle].width[_d]; _offset += (subscript[_d]-_lo[_d]+_w) * _factor; diff --git a/global/src/matmul.c b/global/src/matmul.c index e1eceff0f..7fddfe0ea 100644 --- a/global/src/matmul.c +++ b/global/src/matmul.c @@ -1405,7 +1405,7 @@ void pnga_matmul(transa, transb, alpha, beta, CONTIG_CHUNKS_OPT_FLAG = UNSET; DIRECT_ACCESS_OPT_FLAG = UNSET; } -# if defined(__crayx1) || defined(NEC) +# if defined(NEC) use_NB_matmul = UNSET; # endif } diff --git a/global/src/onesided.c b/global/src/onesided.c index 0e1501e24..f353619eb 100644 --- a/global/src/onesided.c +++ b/global/src/onesided.c @@ -295,7 +295,6 @@ Integer _lo[MAXDIM], _hi[MAXDIM], _pinv, _p_handle; \ ga_ownsM(g_handle, proc, _lo, _hi); \ gaCheckSubscriptM(subscript, _lo, _hi, GA[g_handle].ndim); \ if(_last==0) ld[0]=_hi[0]- _lo[0]+1+2*(Integer)GA[g_handle].width[0]; \ - __CRAYX1_PRAGMA("_CRI shortloop"); \ for(_d=0; _d < _last; _d++) { \ _w = (Integer)GA[g_handle].width[_d]; \ _offset += (subscript[_d]-_lo[_d]+_w) * _factor; \ @@ -330,7 +329,6 @@ Integer _mloc = p* ndim *2;\ #define gam_ComputePatchIndex(ndim, lo, plo, dims, pidx){ \ Integer _d, _factor; \ *pidx = plo[0] -lo[0]; \ - __CRAYX1_PRAGMA("_CRI shortloop"); \ for(_d= 0,_factor=1; _d< ndim -1; _d++){ \ _factor *= (dims[_d]); \ *pidx += _factor * (plo[_d+1]-lo[_d+1]); \ @@ -528,9 +526,6 @@ static void ngai_gets(char *loc_base_ptr, char *prem,int *stride_rem, char *pbuf /** * A common routine called by both non-blocking and blocking GA put calls. */ -#ifdef __crayx1 -#pragma _CRI inline pnga_locate_region -#endif void ngai_put_common(Integer g_a, Integer *lo, Integer *hi, @@ -546,7 +541,7 @@ void ngai_put_common(Integer g_a, int num_loops=2; /* 1st loop for remote procs; 2nd loop for local procs */ Integer n_rstrctd; Integer *rank_rstrctd; -#if defined(__crayx1) || defined(DISABLE_NBOPT) +#if defined(DISABLE_NBOPT) #else Integer ga_nbhandle; int counter=0; @@ -582,7 +577,7 @@ void ngai_put_common(Integer g_a, #endif if(nbhandle)ga_init_nbhandle(nbhandle); -#if !defined(__crayx1) && !defined(DISABLE_NBOPT) +#if !defined(DISABLE_NBOPT) else ga_init_nbhandle(&ga_nbhandle); #endif @@ -591,9 +586,8 @@ void ngai_put_common(Integer g_a, ENABLE_PROFILE_PUT); #endif -#if !defined(__crayx1) && !defined(DISABLE_NBOPT) +#if !defined(DISABLE_NBOPT) for(loop=0; loop -extern char *valloc(); - -char *CreateSharedRegion(id, size) - long *size, *id; -{ - struct timeval tp; - struct timezone tzp; - char *temp; - int status; - - /* Have to round up to a multiple of page size before allocating - on a page boundary */ - *size = ( (*size + (PAGE_SIZE -1)) / PAGE_SIZE ) * PAGE_SIZE; - - if ( (temp = valloc((unsigned) *size)) == (char *) NULL) - Error("CreateSharedRegion: failed in valloc", (long) 0); - - /* Now have to get a unique id ... try using time of day in centi-sec */ - if ( (status = gettimeofday(&tp, &tzp)) != 0) - Error("CreateSharedRegion: error from gettimeofday", (long) status); - - *id = (tp.tv_sec + 10000*tp.tv_usec) & 0xffffff; - - /* Now make the region */ - if ( (status = create_shared_region(*id, temp, *size, 0)) != 0) - Error("CreateSharedRegion: error from create_shared_region", (long) status); - - return temp; -} - - -long DetachSharedRegion( id, size, addr) - long id, size; - char *addr; -{ - return detach_shared_region( id, addr, size); -} - -long DeleteSharedRegion(id) - long id; -{ - return delete_shared_region(id); -} - -char *AttachSharedRegion(id, size) - long id, size; -{ - char *temp; - int status; - - if (size != (((size + (PAGE_SIZE -1)) / PAGE_SIZE) * PAGE_SIZE)) - Error("AttachSharedRegion: input size is not multiple of PAGE_SIZE", - (long) size); - if ( (temp = valloc((unsigned) size)) == (char *) NULL) - Error("AttachSharedRegion: failed in valloc", (long) 0); - - /* Now try to attach */ - if ( (status = attach_shared_region(id, temp, size)) != 0) - Error("AttachSharedRegion: error from attach_shared_region", - (long) status); - - return temp; -} - -#endif #if defined(SEQUENT) || defined(ENCORE) #ifdef SEQUENT @@ -300,125 +232,7 @@ char *AttachSharedRegion(id, size) } #endif -#if defined(CONVEX) || defined(APOLLO) - -#include -#include -#include -#include - -extern char *strdup(); -extern char *mktemp(); - -#define MAX_ID 20 -static struct id_list_struct { - char *addr; /* pointer to shmem region */ - unsigned size; /* size of region */ - char *filename; /* associated file name */ - int fd; /* file descriptor */ - int status; /* = 1 if in use */ -} id_list[MAX_ID]; - -static int next_id = 0; -static char template[] = "/tmp/SHMEM.XXXXXX"; -char *CreateSharedRegion(id, size) - long *size, *id; -{ - char *temp; - - if (next_id == MAX_ID) - Error("CreateSharedRegion: MAX_ID exceeded ", MAX_ID); - *id = next_id; - -#ifdef APOLLO - id_list[*id].fd = -1; -#else - if ( (temp = strdup(template)) == (char *) NULL) - Error("CreateSharedRegion: failed to get space for filename", 0); - -/* Generate scratch file to identify region ... need to know this - name to attach to the region so need to establish some policy - before AttachtoSharedRegion can work */ - - id_list[*id].filename = mktemp(temp); - if ( (id_list[*id].fd = open(id_list[*id].filename, - O_RDWR|O_CREAT, 0666)) < 0) - Error("CreateSharedRegion: failed to open temporary file",0); -#endif - - id_list[*id].addr = mmap((caddr_t) 0, (unsigned *) size, - PROT_READ|PROT_WRITE, - MAP_ANON|MAP_SHARED, id_list[*id].fd, 0); -#ifdef APOLLO - if (id_list[*id].addr == (char *) 0) - Error("CreateSharedRegion: mmap failed",-1); -#else - if (id_list[*id].addr == (char *) -1) - Error("CreateSharedRegion: mmap failed",-1); -#endif - - id_list[*id].size = *size; - id_list[*id].status = 1; - - next_id++; - return id_list[*id].addr; -} - -long DetachSharedRegion( id, size, addr) - long id, size; - char *addr; -{ - if ( (id < 0) || (id > next_id)) - return (long) -1; - - if (id_list[id].status != 1) - return (long) -1; - - id_list[id].status = 0; - - return (long) munmap(id_list[id].addr, 0); -} - -long DeleteSharedRegion(id) - long id; -{ - if ( (id < 0) || (id > next_id) ) - return (long) -1; - - if (id_list[id].status != 1) - return (long) -1; - - (void) DetachSharedRegion(id, 0, (char *) 0); - - if (id_list[id].fd >= 0) { - (void) close(id_list[id].fd); - (void) unlink(id_list[id].filename); - } - return (long) 0; -} - -char *AttachSharedRegion(id, size) - long id, size; -{ - Error("AttachSharedRegion: need mods for this to work on CONVEX", (long) -1); -} - -long DeleteSharedAll() -{ - long id; - long status = 0; - - for (id=0; id> template.p ELSE echo "`whoami` `hostname` 4 `pwd`/PROGRAM /tmp" >> template.p ENDIF diff --git a/tcgmsg/examples/demo.proto b/tcgmsg/examples/demo.proto index d6336933d..7917c58d0 100644 --- a/tcgmsg/examples/demo.proto +++ b/tcgmsg/examples/demo.proto @@ -6,23 +6,6 @@ echo " Example Message Passing Programs" echo " --------------------------------" echo "" -IF IPSC -if (! -e template.p) make template.p - -# Get cube size etc. - -echo -n 'Input options for parallel (default = -w -t 4 -C tcgmsg) ' -set cube="$<" -if ("$cube" == "") set cube = '-w -t 4 -C tcgmsg' -echo " " -ELSEIF DELTA -# Get mesh size for the Delta - -echo -n 'Input desired submesh with no spaces (default = 4,4) ' -set mesh="$<" -if ("$mesh" == "") set mesh = "4,4" -echo " " -ELSE # Find/generate template PROCGRP file if (! -e template.p) then @@ -31,7 +14,6 @@ if (! -e template.p) then make template.p endif -ENDIF # Check no. of arguments @@ -93,30 +75,11 @@ goto RUNIT RUNIT: -IF DELTA -echo " " -echo "Run $PROGRAM on the mesh ($mesh)" -echo " " - -# Actually run the sucker ... assumes can use rcp and rsh to delta1 - -echo rcp $PROGRAM delta1: -rcp $PROGRAM delta1: -echo rsh delta1 mexec "-t\(${mesh}\) -f '$PROGRAM $ARGS'" -rsh delta1 mexec "-t\(${mesh}\) -f '$PROGRAM $ARGS'" - -ELSE - # Generate the actual PROCGRP file from the template and print out # summary of it sed "s/PROGRAM/$PROGRAM/" < template.p > {$PROGRAM}.p -IF IPSC -echo "time parallel $cube $PROGRAM" -time parallel $cube $PROGRAM -ELSE - echo "" echo 'The following hosts/processes will be used:' echo ' ' @@ -126,5 +89,3 @@ echo "" echo time parallel $PROGRAM $ARGS echo "" time parallel $PROGRAM $ARGS -ENDIF -ENDIF diff --git a/tcgmsg/examples/fexit.f.proto b/tcgmsg/examples/fexit.f.proto index 2d3d2744a..2523c7b6d 100644 --- a/tcgmsg/examples/fexit.f.proto +++ b/tcgmsg/examples/fexit.f.proto @@ -1,13 +1,6 @@ subroutine fexit -IF ARDENT -c Fortran returns a non-zero status unless we STOP, which -c produces the irritating FORTRAN STOP message, or we -c explicitly call exit - call exit(0) -ELSE -ENDIF end -IF HPUX HPUXNOEXT IBM IBMNOEXT +IF IBM IBMNOEXT subroutine flush(iunit) end ENDIF diff --git a/tcgmsg/examples/getmem.c b/tcgmsg/examples/getmem.c index 65dd757fb..4f712e429 100644 --- a/tcgmsg/examples/getmem.c +++ b/tcgmsg/examples/getmem.c @@ -5,11 +5,11 @@ /*$Id: getmem.c,v 1.2 1995-02-02 23:24:10 d3g681 Exp $*/ extern char * memalign(); -#if (defined(AIX) || defined(NEXT) || defined(HPUX)) && !defined(EXTNAME) +#if (defined(AIX) || defined(NEXT)) && !defined(EXTNAME) #define getmem_ getmem #endif -#if defined(CRAY) || defined(ARDENT) +#if defined(CRAY) #define getmem_ GETMEM #endif diff --git a/tcgmsg/examples/grid.c b/tcgmsg/examples/grid.c index 7a1f00b6a..0d7e84a99 100644 --- a/tcgmsg/examples/grid.c +++ b/tcgmsg/examples/grid.c @@ -20,10 +20,6 @@ static long plot_type = 0; /* 0 means no plot */ #include "sndrcv.h" -#if defined(DELTA) || defined(IPSC) -#define htonl(a) (a) -#endif - #if !defined(AIX) extern char *malloc(); #endif @@ -457,14 +453,7 @@ double Operate(grid, ncols, nrows, ngrid, do_sums) for (i=1; i