00001 ////////////////////////////////////////////////////////////////////////////////////////////////// 00002 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. 00003 // Produced at the Lawrence Livermore National Laboratory 00004 // LLNL-CODE-433662 00005 // All rights reserved. 00006 // 00007 // This file is part of Muster. For details, see http://github.com/tgamblin/muster. 00008 // Please also read the LICENSE file for further information. 00009 // 00010 // Redistribution and use in source and binary forms, with or without modification, are 00011 // permitted provided that the following conditions are met: 00012 // 00013 // * Redistributions of source code must retain the above copyright notice, this list of 00014 // conditions and the disclaimer below. 00015 // * Redistributions in binary form must reproduce the above copyright notice, this list of 00016 // conditions and the disclaimer (as noted below) in the documentation and/or other materials 00017 // provided with the distribution. 00018 // * Neither the name of the LLNS/LLNL nor the names of its contributors may be used to endorse 00019 // or promote products derived from this software without specific prior written permission. 00020 // 00021 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 00022 // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00023 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 00024 // LAWRENCE LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE 00025 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00027 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00028 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00029 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 ////////////////////////////////////////////////////////////////////////////////////////////////// 00031 00032 /// 00033 /// @file mpi_bindings.h 00034 /// @author Todd Gamblin tgamblin@llnl.gov 00035 /// @brief <code>\#defines</code> for switching between MPI and PMPI bindings. 00036 /// 00037 /// User of the API can <code>\#define</code> <code>MUSTER_USE_PMPI</code> to use the 00038 /// PMPI bindings instead of the plain MPI bindings. Useful 00039 /// for including this algorithm in tools. 00040 /// 00041 /// This file should contain <code>\#defines</code> for all MPI calls used in 00042 /// the cluster library, and needs to be kept current. 00043 /// 00044 #ifndef MUSTER_MPI_BINDINGS_H 00045 #define MUSTER_MPI_BINDINGS_H 00046 00047 #include "muster-config.h" 00048 00049 // External header for MPI type information 00050 #include "mpi_utils.h" 00051 00052 #ifdef MUSTER_USE_PMPI 00053 00054 #define CMPI_Allreduce PMPI_Allreduce 00055 #define CMPI_Bcast PMPI_Bcast 00056 #define CMPI_Comm_rank PMPI_Comm_rank 00057 #define CMPI_Comm_size PMPI_Comm_size 00058 #define CMPI_Gather PMPI_Gather 00059 #define CMPI_Scatter PMPI_Scatter 00060 #define CMPI_Irecv PMPI_Irecv 00061 #define CMPI_Isend PMPI_Isend 00062 #define CMPI_Pack PMPI_Pack 00063 #define CMPI_Pack_size PMPI_Pack_size 00064 #define CMPI_Reduce PMPI_Reduce 00065 #define CMPI_Unpack PMPI_Unpack 00066 #define CMPI_Waitsome PMPI_Waitsome 00067 00068 #define cmpi_packed_size pmpi_packed_size 00069 00070 #else // MUSTER_USE_PMPI 00071 00072 #define CMPI_Allreduce MPI_Allreduce 00073 #define CMPI_Bcast MPI_Bcast 00074 #define CMPI_Comm_rank MPI_Comm_rank 00075 #define CMPI_Comm_size MPI_Comm_size 00076 #define CMPI_Gather MPI_Gather 00077 #define CMPI_Scatter MPI_Scatter 00078 #define CMPI_Irecv MPI_Irecv 00079 #define CMPI_Isend MPI_Isend 00080 #define CMPI_Pack MPI_Pack 00081 #define CMPI_Pack_size MPI_Pack_size 00082 #define CMPI_Reduce MPI_Reduce 00083 #define CMPI_Unpack MPI_Unpack 00084 #define CMPI_Waitsome MPI_Waitsome 00085 00086 #define cmpi_packed_size mpi_packed_size 00087 00088 #endif // MUSTER_USE_PMPI 00089 00090 00091 00092 #endif // MUSTER_MPI_BINDINGS_H