📄 mpif-common.h
字号:
! -*- fortran -*-!! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana! University Research and Technology! Corporation. All rights reserved.! Copyright (c) 2004-2005 The University of Tennessee and The University! of Tennessee Research Foundation. All rights! reserved.! Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, ! University of Stuttgart. All rights reserved.! Copyright (c) 2004-2005 The Regents of the University of California.! All rights reserved.! Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.! $COPYRIGHT$! ! Additional copyrights may follow! ! $HEADER$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Do ***not*** copy this file to the directory where your Fortran ! fortran application is compiled unless it is absolutely necessary! Most! modern Fortran compilers now support the -I command line flag, which! tells the compiler where to find .h files (specifically, this one). For! example:!! shell$ mpif77 foo.f -o foo -I$OMPI_HOME/include!! will probably do the trick (assuming that you have set OMPI_HOME ! properly).!! That being said, OMPI's "mpif77" wrapper compiler should! automatically include the -I option for you. The following command! should be equivalent to the command listed above:!! shell$ mpif77 foo.f -o foo!! You should not copy this file to your local directory because it is! possible that this file will be changed between versions of Open MPI.! Indeed, this mpif.h is incompatible with the mpif.f of other ! implementations of MPI. Using this mpif.h with other implementations ! of MPI, or with other versions of Open MPI will result in undefined! behavior (to include incorrect results, segmentation faults, ! unexplainable "hanging" in your application, etc.). Always use the! -I command line option instead (or let mpif77 do it for you).!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This file contains the bulk of the Open MPI Fortran interface. It! is included as a back-end file to both mpif.h (i.e., the! standardized MPI Fortran header file) and mpi.f90 (the MPI-2! Fortran module source file, found in ompi/mpi/f90).!! This file is marginally different than mpif.h. mpif.h includes! some "external" statements that are not suitable for use with the! MPI-2 F90 module, and therefore cannot be included in the mpi.f90! source file. Hence, this file is essentially everything that! needs to be in the standardized mpif.h *except* the "external"! statements, and is therefore suitable to be included in mpi.f90.!! First, however, include some output from configure.! include 'mpif-config.h'!! MPI version! integer MPI_VERSION, MPI_SUBVERSION parameter (MPI_VERSION=2) parameter (MPI_SUBVERSION=0)!! Miscellaneous constants! integer MPI_ANY_SOURCE, MPI_ANY_TAG integer MPI_PROC_NULL, MPI_MAX_PROCESSOR_NAME integer MPI_ROOT, MPI_MAX_DATAREP_STRING integer MPI_MAX_ERROR_STRING, MPI_UNDEFINED integer MPI_CART, MPI_GRAPH, MPI_KEYVAL_INVALID integer MPI_SOURCE, MPI_TAG, MPI_ERROR integer MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_WTIME_IS_GLOBAL integer MPI_APPNUM, MPI_LASTUSEDCODE, MPI_UNIVERSE_SIZE integer IMPI_CLIENT_SIZE, IMPI_CLIENT_COLOR integer IMPI_HOST_SIZE, IMPI_HOST_COLOR integer MPI_BSEND_OVERHEAD integer MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL integer MPI_MAX_PORT_NAME, MPI_MAX_OBJECT_NAME integer MPI_ORDER_C, MPI_ORDER_FORTRAN integer MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC integer MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG integer MPI_TYPECLASS_INTEGER, MPI_TYPECLASS_REAL integer MPI_TYPECLASS_COMPLEX integer MPI_SEEK_SET, MPI_SEEK_CUR, MPI_SEEK_END integer MPI_MODE_CREATE integer MPI_MODE_RDONLY, MPI_MODE_WRONLY, MPI_MODE_RDWR integer MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN integer MPI_MODE_EXCL, MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL integer MPI_DISPLACEMENT_CURRENT integer MPI_MODE_NOCHECK, MPI_MODE_NOPRECEDE, MPI_MODE_NOPUT integer MPI_MODE_NOSTORE, MPI_MODE_NOSUCCEED integer MPI_LOCK_EXCLUSIVE, MPI_LOCK_SHARED integer MPI_WIN_BASE, MPI_WIN_SIZE, MPI_WIN_DISP_UNIT parameter (MPI_ANY_SOURCE=-1) parameter (MPI_ANY_TAG=-1) parameter (MPI_PROC_NULL=-2) parameter (MPI_ROOT=-4) parameter (MPI_MAX_PROCESSOR_NAME=255) parameter (MPI_MAX_ERROR_STRING=255) parameter (MPI_MAX_DATAREP_STRING=127) parameter (MPI_UNDEFINED=-32766) parameter (MPI_CART=1) parameter (MPI_GRAPH=2) parameter (MPI_KEYVAL_INVALID=-1) parameter (MPI_SOURCE=1) parameter (MPI_TAG=2) parameter (MPI_ERROR=3) parameter (MPI_TAG_UB=0) parameter (MPI_HOST=1) parameter (MPI_IO=2) parameter (MPI_WTIME_IS_GLOBAL=3) parameter (MPI_APPNUM=4) parameter (MPI_LASTUSEDCODE=5) parameter (MPI_UNIVERSE_SIZE=6) parameter (MPI_WIN_BASE=7) parameter (MPI_WIN_SIZE=8) parameter (MPI_WIN_DISP_UNIT=9) parameter (IMPI_CLIENT_SIZE=10) parameter (IMPI_CLIENT_COLOR=11) parameter (IMPI_HOST_SIZE=12) parameter (IMPI_HOST_COLOR=13) parameter (MPI_BSEND_OVERHEAD=128) parameter (MPI_MAX_INFO_KEY=35) parameter (MPI_MAX_INFO_VAL=255) parameter (MPI_MAX_PORT_NAME=35) parameter (MPI_MAX_OBJECT_NAME=63) parameter (MPI_ORDER_C=0) parameter (MPI_ORDER_FORTRAN=1) parameter (MPI_DISTRIBUTE_BLOCK=0) parameter (MPI_DISTRIBUTE_CYCLIC=1) parameter (MPI_DISTRIBUTE_NONE=2) parameter (MPI_DISTRIBUTE_DFLT_DARG=-1) parameter (MPI_TYPECLASS_INTEGER=1) parameter (MPI_TYPECLASS_REAL=2) parameter (MPI_TYPECLASS_COMPLEX=3) parameter (MPI_SEEK_SET=600) parameter (MPI_SEEK_CUR=602) parameter (MPI_SEEK_END=604) parameter (MPI_MODE_CREATE=1) parameter (MPI_MODE_RDONLY=2) parameter (MPI_MODE_WRONLY=4) parameter (MPI_MODE_RDWR=8) parameter (MPI_MODE_DELETE_ON_CLOSE=16) parameter (MPI_MODE_UNIQUE_OPEN=32) parameter (MPI_MODE_EXCL=64) parameter (MPI_MODE_APPEND=128) parameter (MPI_MODE_SEQUENTIAL=256) parameter (MPI_DISPLACEMENT_CURRENT=-54278278) parameter (MPI_MODE_NOCHECK=1) parameter (MPI_MODE_NOPRECEDE=2) parameter (MPI_MODE_NOPUT=4) parameter (MPI_MODE_NOSTORE=8) parameter (MPI_MODE_NOSUCCEED=16) parameter (MPI_LOCK_EXCLUSIVE=1) parameter (MPI_LOCK_SHARED=2)! ! MPI sentinel values!! Several of these types were chosen with care to match specific! overloaded functions in the F90 bindings. They should also match! the types of their corresponding C variables. Do not arbitrarily! change their types without also updating the F90 bindings and! their corresponding types in ompi/mpi/f77/constants.h and! ompi/mpi/runtime/ompi_init.c!!! MPI_BOTTOM is only used where choice buffers can be used (meaning! that we already have overloaded F90 bindings for all available! types), so any type is fine. integer MPI_BOTTOM! MPI_IN_PLACE has the same rationale as MPI_BOTTOM. integer MPI_IN_PLACE! Making MPI_ARGV_NULL be the same type as the parameter that is! exepected in the F90 binding for MPI_COMM_SPAWN means that we! don't need another binding for MPI_COMM_SPAWN. character MPI_ARGV_NULL(1)! The array_of_argv parameter in the F90 bindings for! MPI_COMM_SPAWN_MULTIPLE takes a variable number of dimensions! (specified by the "count" parameter), so it's not possible to have! a single variable match all possible values. Hence, make it an! entirely different type (one that would never likely be used by a! correct program, e.g., double) and have a separate F90 binding for! matching just this type. double precision MPI_ARGVS_NULL! MPI_ERRCODES_IGNORE has similar rationale to MPI_ARGV_NULL. The! F77 functions are all smart enough to check that the errcodes! parameter is not ERRCODES_IGNORE before assigning values into it! (hence, the fact that this is an array of only 1 element does not! matter -- we'll never overrun it because we never assign values! into it). integer MPI_ERRCODES_IGNORE(1)! MPI_STATUS_IGNORE has similar rationale to MPI_ERRCODES_IGNORE. integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)! MPI_STATUSES_IGNORE has similar rationale to MPI_ARGVS_NULL. double precision MPI_STATUSES_IGNORE common/mpi_fortran_bottom/MPI_BOTTOM common/mpi_fortran_in_place/MPI_IN_PLACE common/mpi_fortran_argv_null/MPI_ARGV_NULL common/mpi_fortran_argvs_null/MPI_ARGVS_NULL common/mpi_fortran_errcodes_ignore/MPI_ERRCODES_IGNORE common/mpi_fortran_status_ignore/MPI_STATUS_IGNORE common/mpi_fortran_statuses_ignore/MPI_STATUSES_IGNORE! ! NULL "handles" (indices)! integer MPI_GROUP_NULL, MPI_COMM_NULL, MPI_DATATYPE_NULL integer MPI_REQUEST_NULL, MPI_OP_NULL, MPI_ERRHANDLER_NULL integer MPI_INFO_NULL, MPI_WIN_NULL, MPI_FILE_NULL parameter (MPI_GROUP_NULL=0) parameter (MPI_COMM_NULL=2) parameter (MPI_DATATYPE_NULL=0) parameter (MPI_REQUEST_NULL=0) parameter (MPI_OP_NULL=0) parameter (MPI_ERRHANDLER_NULL=0) parameter (MPI_INFO_NULL=0) parameter (MPI_WIN_NULL=0) parameter (MPI_FILE_NULL=0)! ! MPI_Init_thread constants! integer MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED integer MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -