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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1388 - (show annotations)
Fri Jan 11 07:45:58 2008 UTC (11 years, 9 months ago) by trankine
File MIME type: text/plain
File size: 1646 byte(s)
And get the *(&(*&(* name right
1
2 /* $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"
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); }
35
36 /* Datatypes */
37 struct Paso_MPIInfo {
38 dim_t reference_counter;
39 int size;
40 Paso_MPI_rank rank;
41 MPI_Comm comm;
42 int msg_tag_counter;
43 };
44
45 typedef struct Paso_MPIInfo Paso_MPIInfo;
46
47 /* Function prototypes */
48 Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
49 void Paso_MPIInfo_free( Paso_MPIInfo* );
50 Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
51 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 /* INC_PASO_MPI */

  ViewVC Help
Powered by ViewVC 1.1.26