⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p4_md.h

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ------------------ Machine Dependent Definitions ---------------- *//*        It is important to maintain the order of many of the         definitions in this file.*/#if defined(SUN_SOLARIS)#define HP#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "SUN"#endif/*  An I86_SOLARIS is SUN_SOLARIS in every way except P4_MACHINE_TYPE */#if defined(I86_SOLARIS)#define SUN_SOLARIS#define HP#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "I86_SOLARIS"#endif#if defined(ALPHA)#define DEC5000#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "DEC5000"#endif#if defined(MEIKO_CS2)#define IPSC860#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "IPSC860"#endif#if defined(SP1)#define RS6000#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "RS6000"/* Some SP batch systems don't get getlogin right */#define GETLOGIN_BROKEN#endif#if defined(SP1_EUI) || defined(SP1_EUIH)#define RS6000#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "RS6000"/* Some SP batch systems don't get getlogin right */#define GETLOGIN_BROKEN#endif#if defined(SGI_MP) || defined(SGI_CH) || defined (SGI_CH64) || \    defined(SGI_CH32)#define SGI#define VENDOR_IPC#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "SGI"#endif/* All SGIs ??? */#if defined(SGI_CH64) || defined(SGI_MP) || defined(SGI)/* Create a new session to work around kills that kill the process group */#define SET_NEW_PGRP#endif#if defined(PARAGON)#define IPSC860#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "IPSC860"#endif#if defined(LINUX)#define P4_MACHINE_TYPE "LINUX"/* Linux distributions that use inetutils have versions of rsh that   process ALL arguments, even those after the command!  This should be   safe for Linux versions that do not do this, and fix the ones   that do.  (The fix is to escape the arguments with \\ in front of the   arg.) */#define HAVE_BROKEN_RSH#endif#if defined(LINUX_PPC)#define P4_MACHINE_TYPE "LINUX_PPC"#endif#if defined(NETBSD)#define P4_MACHINE_TYPE "NETBSD"#endif#if defined(FREEBSD)#define P4_MACHINE_TYPE "FREEBSD"#endif#if defined(CONVEX)#define SUN#undef P4_MACHINE_TYPE#define P4_MACHINE_TYPE "SUN"#endif#if defined(TC_2000_TCMP)#define TC_2000#define TCMP#endif#if defined(FX8)  ||  defined(FX2800)  || defined(FX2800_SWITCH)#define ALLIANT#endif/* Rumor has it LINUX support VPRINTF */#if defined(FX2800)  || defined(FX2800_SWITCH) || defined(FREEBSD) || \    defined(NETBSD)#define VPRINTF#endif#if defined(DELTA) || defined(IPSC860_SOCKETS) || defined(PARAGON)#define IPSC860#endif#if defined(CM5_SOCKETS)#define CM5#endif#if defined(NCUBE_SOCKETS)#define NCUBE#endif#if defined(NEXT)  || defined(KSR) ||  defined(IPSC860)  || defined(NCUBE)#define GLOBAL#endif#if defined(SUN)        || defined(DEC5000)  || defined(LINUX) || \    defined(NEXT)       || defined(KSR)      || defined(FREEBSD) || \    defined(SYMMETRY)   || defined(BALANCE)  || defined(NETBSD) || \    defined(ALLIANT)    || defined(MULTIMAX) ||  defined(CM5) || \    defined(GP_1000)    || defined(TC_2000)  ||  defined(IBM3090)#define P4BSD#endif#if defined(SUN)        || defined(DEC5000)  || defined(LINUX) || \    defined(NEXT)       || defined(KSR)      || defined(FREEBSD) || \    defined(SYMMETRY)   || defined(BALANCE)  || defined(NETBSD) || \    defined(ALLIANT)    || defined(MULTIMAX) || \    defined(GP_1000)    || defined(TC_2000)  ||  defined(IBM3090)#define CAN_DO_SETSOCKOPT#endif#if defined(RS6000)          ||                          \    defined(IPSC860_SOCKETS) ||                          \    defined(NCUBE_SOCKETS)   ||                          \    defined(DELTA)           || defined(TITAN)        || \    defined(SGI)             || defined(CRAY)         || \    defined(HP)              || defined(SYMMETRY_PTX)#define CAN_DO_SETSOCKOPT/* If SGI, select features suggested by SGI */#ifdef SGI#define SGI_TEST#endif#ifdef NEEDS_NETINET#include <netinet/in.h>#endif#endif#if defined(RS6000)       || \    defined(IPSC860)      ||                          \    defined(NCUBE)        ||                          \    defined(DELTA)        || defined(TITAN)        || \    defined(SGI)          || defined(CRAY)         || \    defined(HP)           || defined(SYMMETRY_PTX) || \    defined(MEIKO_CS2)#define P4SYSV#endif/*    sigaction is more reliable than signal, particularly on POSIX   systems, where the semantics of signal have CHANGED (to reset to   the default handler!)    Note that the SIGNAL_WITH_OLD_P4 version allows you to get the   previous handler.  You must supply the equals; this lets   you do   SIGNAL_WITH_OLD_P4(SIGFOO,newfcn,oldfcn=(cast)) */#if defined(HAVE_SIGACTION)/* Here is the most reliable version.  Systems that don't provide   SA_RESETHAND are basically broken at a deep level. */#if defined(SA_RESETHAND)#define SIGNAL_WITH_OLD_P4(signame,sigf,oldsigf) {\struct sigaction oldact;\sigaction( signame, (struct sigaction *)0, &oldact );\oldsigf oldact.sa_handler;\oldact.sa_handler = sigf;\oldact.sa_flags   = oldact.sa_flags & ~(SA_RESETHAND);\sigaddset( &oldact.sa_mask, signame );\sigaction( signame, &oldact, (struct sigaction *)0 );}#define SIGNAL_P4(signame,sigf) {\struct sigaction oldact;\sigaction( signame, (struct sigaction *)0, &oldact );\p4_CheckSighandler( oldact.sa_handler ); \oldact.sa_handler = sigf;\oldact.sa_flags   = oldact.sa_flags & ~(SA_RESETHAND);\sigaddset( &oldact.sa_mask, signame );\sigaction( signame, &oldact, (struct sigaction *)0 );}#else/* If SA_RESETHAND is not defined, we hope that by masking off the   signal we're catching that it won't deliver that signal to SIG_DFL */#define SIGNAL_WITH_OLD_P4(signame,sigf,oldsigf) {\struct sigaction oldact;\sigaction( signame, (struct sigaction *)0, &oldact );\oldsigf oldact.sa_handler;\oldact.sa_handler = sigf;\sigaddset( &oldact.sa_mask, signame );\sigaction( signame, &oldact, (struct sigaction *)0 );}#define SIGNAL_P4(signame,sigf) {\struct sigaction oldact;\sigaction( signame, (struct sigaction *)0, &oldact );\p4_CheckSighandler( oldact.sa_handler ); \oldact.sa_handler = sigf;\sigaddset( &oldact.sa_mask, signame );\sigaction( signame, &oldact, (struct sigaction *)0 );}#endif#else#ifdef P4SYSV#   ifdef NCUBE#   define SIGNAL_WITH_OLD_P4(signame,sigf,oldsigf) \            oldsigf signal(signame,sigf)#   define SIGNAL_P4(signame,sigf) signal(signame,sigf)#   else#   define SIGNAL_WITH_OLD_P4(signame,sigf,oldsigf) \           oldsigf sigset(signame,sigf)#   define SIGNAL_P4(signame,sigf) sigset(signame,sigf)#   endif#else#define SIGNAL_WITH_OLD_P4(signame,sigf,oldsigf) oldsigf signal(signame,sigf)#ifdef CHECK_SIGNALS#define SIGNAL_P4(signame,sigf) p4_CheckSighandler( signal(signame,sigf) );#else#define SIGNAL_P4(signame,sigf) signal(signame,sigf);#endif#endif#endif#if defined(LINUX) || defined(RS6000) || defined(CRAY) || defined(SUN_SOLARIS)/* These should actually use sigaction INSTEAD of signal; that's for later.   This is for systems that make the signals "one-shot", so you can have   race conditions if you expect your handler to always handle the signals.   Other systems my need this but I'll add them as I test it. */#define NEED_SIGACTION#endif#ifndef P4BOOL#define P4BOOL int#endif#if defined(BALANCE)  ||  defined(FX8)#define P4VOID int#else #define P4VOID void#endif/*----------------- IBM SP-1 with EUI library ------------- */#if defined(SP1_EUI)#define NO_TYPE_EUI     0 #define ACK_REQUEST_EUI 1#define ACK_REPLY_EUI   2#define ANY_P4TYPE_EUI  (-1)#define MYNODE()  eui_mynode#define CAN_DO_CUBE_MSGS#define MD_cube_send  MD_eui_send#define MD_cube_recv  MD_eui_recv#define MD_cube_msgs_available  MD_eui_msgs_available#endif/*----------------- IBM SP-1 with EUI-H library ------------- */#if defined(SP1_EUIH)#define NO_TYPE_EUIH     0 #define ACK_REQUEST_EUIH 1#define ACK_REPLY_EUIH   2#define ANY_P4TYPE_EUIH  -1#define MYNODE()  euih_mynode#define CAN_DO_CUBE_MSGS#define MD_cube_send            MD_euih_send#define MD_cube_recv            MD_euih_recv#define MD_cube_msgs_available  MD_euih_msgs_available#endif/*------------------ Encore Multimax ---------------------- */#if defined(MULTIMAX)#include <parallel.h>#ifndef LINTtypedef LOCK *MD_lock_t;#define MD_lock_init(l)  *(l) = spin_create(PAR_UNLOCKED);#define MD_lock(l)       spin_lock(*(l));#define MD_unlock(l)     spin_unlock(*(l));#endif#define GLOBMEMSIZE  (4*1024*1024)#define CAN_DO_SOCKET_MSGS#define CAN_DO_XDR#define CAN_DO_SHMEM_MSGS#define P4_MAX_MSG_QUEUES 64#endif/*------------------ Sequent Balance or Symmetry ---------------------- */#if !defined(SYMMETRY) && !defined(SYMMETRY_PTX) && !defined(BALANCE)#define CAN_HANDLE_SIGSEGV#endif#if defined(BALANCE) || defined(SYMMETRY) || defined(SYMMETRY_PTX)#include <parallel/parallel.h>#if defined(SYMMETRY_PTX)#include <sys/timers.h>          /* for getclock */#endiftypedef slock_t MD_lock_t;#ifndef LINT#define MD_lock_init(l)  s_init_lock(l);#define MD_lock(l)       s_lock(l);#define MD_unlock(l)     s_unlock(l);#endifextern char *shmalloc();#if defined(SYMMETRY_PTX)extern P4VOID *malloc();#elseextern char *malloc();#endif#define GLOBMEMSIZE  (4*1024*1024)#define CAN_DO_SOCKET_MSGS#define CAN_DO_XDR#define CAN_DO_SHMEM_MSGS#define P4_MAX_MSG_QUEUES 64#endif/*---------------------------- Alliant -------------------------------- */#if defined(ALLIANT)typedef char MD_lock_t;#ifndef LINT#define MD_lock_init(l)  initialize_lock(l);#define MD_lock(l)       lock(l);#define MD_unlock(l)     unlock(l);#endifextern char *valloc();#define GLOBMEMSIZE  (2*1024*1024)#define USE_XX_SHMALLOC          /* If not defined uses dumb xx_malloc */#define CAN_DO_SOCKET_MSGS#define CAN_DO_XDR#define CAN_DO_SHMEM_MSGS#define P4_MAX_MSG_QUEUES 64#endif#if defined(FX2800_SWITCH)#include "sw.h"#define CAN_DO_SWITCH_MSGS#endif/*---------------------------- Others -------------------------- */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -