/[escript]/trunk/paso/src/Paso_MPI.h
ViewVC logotype

Diff of /trunk/paso/src/Paso_MPI.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/paso/src/Paso_MPI.h revision 731 by bcumming, Mon May 15 04:09:52 2006 UTC temp/paso/src/Paso_MPI.h revision 1387 by trankine, Fri Jan 11 07:45:26 2008 UTC
# Line 1  Line 1 
 #ifndef INC_MPI  
 #define INC_MPI  
1    
2  #include "mpi_C.h"  /* $Id$ */
3    
4    /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        Primary Business: Queensland, Australia
11     *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16    #ifndef INC_PASO_MPI
17    #define INC_PASO_MPI
18    
19  #include "Common.h"  #include "Common.h"
20    #include "Paso.h"
21    
22    #ifdef PASO_MPI
23       #include "mpi_C.h"
24    #else
25       typedef int MPI_Comm;
26       typedef int MPI_Request;
27       #define MPI_INT 6
28       #define MPI_DOUBLE 11
29       #define MPI_COMM_WORLD 91
30    #endif
31    
32    typedef int Paso_MPI_rank;
33    
34  #define PASO_MPI_TODO   { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }  #define PASO_MPI_TODO   { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
35    
36  /* Datatypes */  /* Datatypes */
37  struct Paso_MPIInfo{  struct Paso_MPIInfo {
38    dim_t reference_counter;    dim_t reference_counter;
39    int size;    int size;
40    int rank;    Paso_MPI_rank rank;
41    MPI_Comm comm;    MPI_Comm comm;
42      int msg_tag_counter;
43  };  };
44    
45  typedef struct Paso_MPIInfo Paso_MPIInfo;  typedef struct Paso_MPIInfo Paso_MPIInfo;
46    
47  /* Function prototypes */  /* Function prototypes */
48  Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );  Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
49  void          Paso_MPIInfo_dealloc( Paso_MPIInfo* );  void          Paso_MPIInfo_free( Paso_MPIInfo* );
50  Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );  Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
51  int           Paso_MPI_initialized( void );  int           Paso_MPIInfo_initialized( void );
52    index_t Paso_MPIInfo_mod(index_t n, index_t k);
53    dim_t Paso_MPIInfo_setDistribution(Paso_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
54    void Paso_MPIInfo_Split( Paso_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
55    bool_t Paso_MPIInfo_noError( Paso_MPIInfo *mpi_info);
56    char *Paso_MPI_appendRankToFileName(char *, int, int);
57    
58  #endif  #endif /* INC_PASO_MPI */

Legend:
Removed from v.731  
changed lines
  Added in v.1387

  ViewVC Help
Powered by ViewVC 1.1.26