/[escript]/branches/arrexp_2137_win/paso/src/Paso_MPI.h
ViewVC logotype

Diff of /branches/arrexp_2137_win/paso/src/Paso_MPI.h

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

revision 1028 by gross, Wed Mar 14 00:15:24 2007 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1  #ifndef INC_MPI  
2  #define INC_MPI  /* $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  #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  #include "mpi_C.h"  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); }
 #define PASO_INFO_ERRORMSG( err, msg ) { char _msg__[256]; sprintf( _msg__, "%s : %s:%d\n", msg, __FILE__, __LINE__ ); Paso_setError( err, _msg__ );  }  
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    
57  #endif /* INC_PASO_MPI */  #endif /* INC_PASO_MPI */
   
 #endif /* PASO_MPI */  

Legend:
Removed from v.1028  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26