source: CIVL/examples/mpi-omp/AMG2013/utilities/thread_mpistubs.h

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 6.3 KB
RevLine 
[2aa6644]1/*BHEADER**********************************************************************
2 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3 * Produced at the Lawrence Livermore National Laboratory.
4 * This file is part of HYPRE. See file COPYRIGHT for details.
5 *
6 * HYPRE is free software; you can redistribute it and/or modify it under the
7 * terms of the GNU Lesser General Public License (as published by the Free
8 * Software Foundation) version 2.1 dated February 1999.
9 *
10 * $Revision: 2.4 $
11 ***********************************************************************EHEADER*/
12
13/******************************************************************************
14 *
15 * Fake mpi stubs to generate serial codes without mpi
16 *
17 *****************************************************************************/
18/*just a test comment*/
19#ifndef hypre_thread_MPISTUBS
20#define hypre_thread_MPISTUBS
21
22#ifdef HYPRE_USE_PTHREADS
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifndef HYPRE_USING_THREAD_MPISTUBS
29
30#define MPI_Init hypre_thread_MPI_Init
31#define MPI_Wtime hypre_thread_MPI_Wtime
32#define MPI_Wtick hypre_thread_MPI_Wtick
33#define MPI_Barrier hypre_thread_MPI_Barrier
34#define MPI_Finalize hypre_thread_MPI_Finalize
35#define MPI_Comm_group hypre_thread_MPI_Comm_group
36#define MPI_Comm_dup hypre_thread_MPI_Comm_dup
37#define MPI_Group_incl hypre_thread_MPI_Group_incl
38#define MPI_Comm_create hypre_thread_MPI_Comm_create
39#define MPI_Allgather hypre_thread_MPI_Allgather
40#define MPI_Allgatherv hypre_thread_MPI_Allgatherv
41#define MPI_Bcast hypre_thread_MPI_Bcast
42#define MPI_Send hypre_thread_MPI_Send
43#define MPI_Recv hypre_thread_MPI_Recv
44
45#define MPI_Isend hypre_thread_MPI_Isend
46#define MPI_Irecv hypre_thread_MPI_Irecv
47#define MPI_Wait hypre_thread_MPI_Wait
48#define MPI_Waitall hypre_thread_MPI_Waitall
49#define MPI_Waitany hypre_thread_MPI_Waitany
50#define MPI_Comm_size hypre_thread_MPI_Comm_size
51#define MPI_Comm_rank hypre_thread_MPI_Comm_rank
52#define MPI_Allreduce hypre_thread_MPI_Allreduce
53#define MPI_Type_hvector hypre_thread_MPI_Type_hvector
54#define MPI_Type_struct hypre_thread_MPI_Type_struct
55#define MPI_Type_free hypre_thread_MPI_Type_free
56#define MPI_Type_commit hypre_thread_MPI_Type_commit
57
58#endif
59
60/*--------------------------------------------------------------------------
61 * Prototypes
62 *--------------------------------------------------------------------------*/
63
64/* mpistubs.c */
65int MPI_Init( int *argc , char ***argv );
66double MPI_Wtime( void );
67double MPI_Wtick( void );
68int MPI_Barrier( MPI_Comm comm );
69int MPI_Finalize( void );
70int MPI_Abort( MPI_Comm comm , int errorcode );
71int MPI_Comm_group( MPI_Comm comm , MPI_Group *group );
72int MPI_Comm_dup( MPI_Comm comm , MPI_Comm *newcomm );
73int MPI_Group_incl( MPI_Group group , int n , int *ranks , MPI_Group *newgroup );
74int MPI_Comm_create( MPI_Comm comm , MPI_Group group , MPI_Comm *newcomm );
75int MPI_Get_count( MPI_Status *status , MPI_Datatype datatype , int *count );
76int MPI_Alltoall( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , MPI_Comm comm );
77int MPI_Allgather( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , MPI_Comm comm );
78int MPI_Allgatherv( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int *recvcounts , int *displs , MPI_Datatype recvtype , MPI_Comm comm );
79int MPI_Gather( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , int root , MPI_Comm comm );
80int MPI_Scatter( void *sendbuf , int sendcount , MPI_Datatype sendtype , void *recvbuf , int recvcount , MPI_Datatype recvtype , int root , MPI_Comm comm );
81int MPI_Bcast( void *buffer , int count , MPI_Datatype datatype , int root , MPI_Comm comm );
82int MPI_Send( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm );
83int MPI_Recv( void *buf , int count , MPI_Datatype datatype , int source , int tag , MPI_Comm comm , MPI_Status *status );
84int MPI_Isend( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
85int MPI_Irecv( void *buf , int count , MPI_Datatype datatype , int source , int tag , MPI_Comm comm , MPI_Request *request );
86int MPI_Wait( MPI_Request *request , MPI_Status *status );
87int MPI_Waitall( int count , MPI_Request *array_of_requests , MPI_Status *array_of_statuses );
88int MPI_Waitany( int count , MPI_Request *array_of_requests , int *index , MPI_Status *status );
89int MPI_Comm_size( MPI_Comm comm , int *size );
90int MPI_Comm_rank( MPI_Comm comm , int *rank );
91int MPI_Allreduce( void *sendbuf , void *recvbuf , int count , MPI_Datatype datatype , MPI_Op op , MPI_Comm comm );
92int MPI_Address( void *location , MPI_Aint *address );
93int MPI_Type_contiguous( int count , MPI_Datatype oldtype , MPI_Datatype *newtype );
94int MPI_Type_vector( int count , int blocklength , int stride , MPI_Datatype oldtype , MPI_Datatype *newtype );
95int MPI_Type_hvector( int count , int blocklength , MPI_Aint stride , MPI_Datatype oldtype , MPI_Datatype *newtype );
96int MPI_Type_struct( int count , int *array_of_blocklengths , MPI_Aint *array_of_displacements , MPI_Datatype *array_of_types , MPI_Datatype *newtype );
97int MPI_Type_free( MPI_Datatype *datatype );
98int MPI_Type_commit( MPI_Datatype *datatype );
99int MPI_Request_free( MPI_Request *request );
100int MPI_Send_init( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
101int MPI_Recv_init( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
102int MPI_Startall( int count , MPI_Request *array_of_requests );
103int MPI_Iprobe( int source , int tag , MPI_Comm comm , int *flag , MPI_Status *status );
104int MPI_Probe( int source , int tag , MPI_Comm comm , MPI_Status *status );
105int MPI_Irsend( void *buf , int count , MPI_Datatype datatype , int dest , int tag , MPI_Comm comm , MPI_Request *request );
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif
112
113#endif
Note: See TracBrowser for help on using the repository browser.