MOOCHO (Single Doxygen Collection) Version of the Day
RTOp_mpi.h
Go to the documentation of this file.
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
00006 //       Operations
00007 //                Copyright (2006) Sandia Corporation
00008 // 
00009 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 // license for use of this work by or on behalf of the U.S. Government.
00011 // 
00012 // This library is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU Lesser General Public License as
00014 // published by the Free Software Foundation; either version 2.1 of the
00015 // License, or (at your option) any later version.
00016 //  
00017 // This library is distributed in the hope that it will be useful, but
00018 // WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 // Lesser General Public License for more details.
00021 //  
00022 // You should have received a copy of the GNU Lesser General Public
00023 // License along with this library; if not, write to the Free Software
00024 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025 // USA
00026 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00027 // 
00028 // ***********************************************************************
00029 // @HEADER
00030 */
00031 
00032 /* */
00033 /* MPI declarations used by RTOp example program. */
00034 /* These where taken from mpich for Windows NT. */
00035 /* */
00036 
00037 #ifndef RTOP_MPI_H
00038 #define RTOP_MPI_H
00039 
00040 #include "RTOp_ConfigDefs.hpp" /* This C++ file has a proper C mode */
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 /* ////////////////////////// */
00047 /* MPI declarations */
00048 
00049 #define MPI_Aint int
00050 typedef int MPI_Datatype;
00051 #define MPI_CHAR           ((MPI_Datatype)1)
00052 #define MPI_INT            ((MPI_Datatype)6)
00053 #define MPI_FLOAT          ((MPI_Datatype)10)
00054 #define MPI_DOUBLE         ((MPI_Datatype)11)
00055 typedef int MPI_Comm;
00056 #define MPI_COMM_WORLD 91
00057 #define MPI_COMM_NULL      ((MPI_Comm)0)
00058 typedef int MPI_Op;
00059 #define MPI_OP_NULL        ((MPI_Op)0)
00060 #define MPI_MAX            (MPI_Op)(100)
00061 #define MPI_MIN            (MPI_Op)(101)
00062 #define MPI_SUM            (MPI_Op)(102)
00063 #define MPI_DATATYPE_NULL  ((MPI_Datatype)0)
00064 typedef struct { int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; } RTOP_MPI_Status;
00065 typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * ); 
00066 
00067 /* ////////////////////////// */
00068 /* MPI functions */
00069 
00070 #define EXPORT_MPI_API
00071 EXPORT_MPI_API int MPI_Init(int *, char ***);
00072 EXPORT_MPI_API int MPI_Finalize(void);
00073 EXPORT_MPI_API int MPI_Comm_size(MPI_Comm, int *);
00074 EXPORT_MPI_API int MPI_Comm_rank(MPI_Comm, int *);
00075 EXPORT_MPI_API int MPI_Type_struct(int, int *, MPI_Aint *, MPI_Datatype *, MPI_Datatype *);
00076 EXPORT_MPI_API int MPI_Type_commit(MPI_Datatype *);
00077 EXPORT_MPI_API int MPI_Type_free(MPI_Datatype *);
00078 EXPORT_MPI_API int MPI_Op_create(MPI_User_function *, int, MPI_Op *);
00079 EXPORT_MPI_API int MPI_Op_free( MPI_Op *);
00080 EXPORT_MPI_API int MPI_Send(void*, int, MPI_Datatype, int, int, MPI_Comm);
00081 EXPORT_MPI_API int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, RTOP_MPI_Status*);
00082 EXPORT_MPI_API int MPI_Sendrecv_replace(void*, int, MPI_Datatype, int, int, int, int, MPI_Comm, RTOP_MPI_Status*);
00083 EXPORT_MPI_API int MPI_Reduce(void* , void*, int, MPI_Datatype, MPI_Op, int, MPI_Comm);
00084 EXPORT_MPI_API int MPI_Allreduce(void* , void*, int, MPI_Datatype, MPI_Op, MPI_Comm);
00085 EXPORT_MPI_API int MPI_Barrier(MPI_Comm);
00086 EXPORT_MPI_API int MPI_Bcast(void*, int, MPI_Datatype, int, MPI_Comm );
00087 EXPORT_MPI_API int MPI_Gather(void* , int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm); 
00088 
00089 #ifdef __cplusplus
00090 }
00091 #endif
00092 
00093 #endif /* RTOP_MPI_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines