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

📄 mpidimpl.h

📁 fortran并行计算包
💻 H
📖 第 1 页 / 共 2 页
字号:
/*  (C)Copyright IBM Corp.  2007, 2008  *//** * \file include/mpidimpl.h * \brief DCMF API MPID additions to MPI functions and structures *//* *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. */#ifndef MPICH_DCMF_MPIDIMPL_H_INCLUDED#define MPICH_DCMF_MPIDIMPL_H_INCLUDED/* **************************************************************** * Asserts are divided into three levels: * 1. abort  - Always active and always issues assert(0). *             Primarily used for unimplemented code paths. * 2. assert - Active by default, or when MPID_ASSERT_PROD is defined. *             Meant to flag user errors. * 3. assert_debug - Active by default.  Meant to flag coding *                   errors before shipping. * Only one of MPID_ASSERT_ABORT, MPID_ASSERT_PROD (or nothing) should * be specified. * - MPID_ASSERT_ABORT means that the "abort" level is the only level *   of asserts that is active.  Other levels are turned off. * - MPID_ASSERT_PROD means that "abort" and "assert" levels are active. *   "assert_debug" is turned off. * - Not specifying MPID_ASSERT_ABORT or MPID_ASSERT_PROD means that all *   levels of asserts ("abort", "assert", "assert_debug") are *   active. * **************************************************************** */#include <mpid_config.h>#include <assert.h>#if ASSERT_LEVEL==0#define MPID_abort()         assert(0)#define MPID_assert(x)#define MPID_assert_debug(x)#elif ASSERT_LEVEL==1#define MPID_abort()         assert(0)#define MPID_assert(x)       assert(x)#define MPID_assert_debug(x)#else /* ASSERT_LEVEL==2 *//** \brief Always exit--usually implies missing functionality */#define MPID_abort()         assert(0)/** \brief Tests for likely problems--may not be active in performance code  */#define MPID_assert(x)       assert(x)/** \brief Tests for rare problems--may not be active in production code */#define MPID_assert_debug(x) assert(x)#endif#include "mpiimpl.h"#include "mpidpre.h"#include "mpidpost.h"/** * \brief MPI Process descriptor * * This structure contains the request queues for message tracking */typedef struct{  struct  {    unsigned topology;    unsigned collectives;  }  optimized;  unsigned eager_limit;  unsigned verbose        :  8;  unsigned statistics     :  8;  /**< Flag to show the current level of stats collection */  unsigned use_interrupts :  1;/*unsigned unused_flags   : 15; */  unsigned rma_pending;}      MPIDI_Process_t;extern MPIDI_Process_t MPIDI_Process;typedef struct{  DCMF_Protocol_t send;  DCMF_Protocol_t rzv;  DCMF_Protocol_t get;  DCMF_Protocol_t protocol;  DCMF_Protocol_t control;  DCMF_Protocol_t globalbarrier;  DCMF_Protocol_t globalbcast;  DCMF_Protocol_t globalallreduce;}      MPIDI_Protocol_t;extern MPIDI_Protocol_t MPIDI_Protocols;typedef struct{   unsigned char numcolors; /* number of colors for bcast/allreduce */   /* Optimized barrier protocols and usage flags */   struct   {      DCMF_CollectiveProtocol_t gi;      unsigned char usegi;      DCMF_CollectiveProtocol_t binomial;      unsigned char usebinom;   } barrier;   unsigned char optbarrier; /* do we have an optimized barrier? */   /* Optimized local barrier protocols and usage flags  (not used directly by MPICH     * but stored in the geometry) */   struct   {      DCMF_CollectiveProtocol_t lockbox;       unsigned char uselockbox;      DCMF_CollectiveProtocol_t binomial;      unsigned char usebinom;   } localbarrier;   /* Optimized broadcast protocols and usage flags */   struct   {      DCMF_CollectiveProtocol_t tree;      unsigned char usetree;      DCMF_CollectiveProtocol_t rectangle;      unsigned char userect;      DCMF_CollectiveProtocol_t binomial;      unsigned char usebinom;   } broadcast;   unsigned char optbroadcast;   /* Optimized alltoallv protocol and usage flag */   struct   {      DCMF_CollectiveProtocol_t torus;      unsigned char usetorus;   } alltoallv;   /* For consistancy, optimized alltoall flag. Uses alltoallv protocol */   struct   {      unsigned char usetorus;      unsigned char premalloc;   } alltoall;   struct   {      unsigned char usetorus;   } alltoallw;         /* Optimized allgather usage flag */   struct   {      unsigned char useallreduce;      unsigned char usebcast;      unsigned char usealltoallv;   } allgather;   unsigned char optallgather;   /* Optimized allgatherv usage flag */   struct   {      unsigned char useallreduce;      unsigned char usebcast;      unsigned char usealltoallv;   } allgatherv;   unsigned char optallgatherv;   /* Optimized allreduce protocols and usage flags */   struct   {      unsigned char reusestorage;      DCMF_CollectiveProtocol_t pipelinedtree;      unsigned char usepipelinedtree;      DCMF_CollectiveProtocol_t tree;      unsigned char usetree;      unsigned char useccmitree;      DCMF_CollectiveProtocol_t rectangle;      unsigned char userect;      DCMF_CollectiveProtocol_t rectanglering;      unsigned char userectring;      DCMF_CollectiveProtocol_t binomial;      unsigned char usebinom;   } allreduce;   unsigned char optallreduce;   /* Optimized reduce protocols and usage flags */   struct   {      unsigned char reusestorage;      DCMF_CollectiveProtocol_t tree;      unsigned char usetree;      unsigned char useccmitree;      DCMF_CollectiveProtocol_t rectangle;      unsigned char userect;      DCMF_CollectiveProtocol_t rectanglering;      unsigned char userectring;      DCMF_CollectiveProtocol_t binomial;      unsigned char usebinom;   } reduce;   unsigned char optreduce;}      MPIDI_CollectiveProtocol_t;extern MPIDI_CollectiveProtocol_t MPIDI_CollectiveProtocols;extern DCMF_Hardware_t mpid_hw;/** * ************************************************************************* * Low-level request utilities: allocation, release of * requests, with a holding pen for just-released requests. This is * code stolen from MPICH, now in mpidi_dcmfts_request.c * ************************************************************************* *//** * ************************************************************************* * Request queue related utilities (stolen from CH3; in src/impl) * ************************************************************************* *//** * \addtogroup MPID_RECVQ * \{ */void MPIDI_Recvq_init();void MPIDI_Recvq_finalize();

⌨️ 快捷键说明

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