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

Contents of /branches/arrexp_trunk2098/paso/src/Paso_MPI.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2111 - (show annotations)
Mon Dec 1 01:16:18 2008 UTC (10 years, 7 months ago) by jfenwick
File MIME type: text/plain
File size: 1743 byte(s)
Doin' some experiments

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #ifndef INC_PASO_MPI
16 #define INC_PASO_MPI
17
18 #include "Common.h"
19 #include "Paso.h"
20
21 #ifdef PASO_MPI
22 #include "mpi_C.h"
23 #else
24 typedef int MPI_Comm;
25 typedef int MPI_Request;
26 #define MPI_INT 6
27 #define MPI_DOUBLE 11
28 #define MPI_COMM_WORLD 91
29 #endif
30
31 typedef int Paso_MPI_rank;
32
33 #define PASO_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
34
35 /* Datatypes */
36 struct Paso_MPIInfo {
37 dim_t reference_counter;
38 int size;
39 Paso_MPI_rank rank;
40 MPI_Comm comm;
41 int msg_tag_counter;
42 };
43
44 typedef struct Paso_MPIInfo Paso_MPIInfo;
45
46 /* Function prototypes */
47
48 PASO_DLL_API
49 Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
50
51 PASO_DLL_API
52 void Paso_MPIInfo_free( Paso_MPIInfo* );
53
54 PASO_DLL_API
55 Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
56
57 PASO_DLL_API
58 int Paso_MPIInfo_initialized( void );
59
60 PASO_DLL_API
61 index_t Paso_MPIInfo_mod(index_t n, index_t k);
62
63 PASO_DLL_API
64 dim_t Paso_MPIInfo_setDistribution(Paso_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
65
66 PASO_DLL_API
67 void Paso_MPIInfo_Split( Paso_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
68
69 PASO_DLL_API
70 bool_t Paso_MPIInfo_noError( Paso_MPIInfo *mpi_info);
71
72 PASO_DLL_API
73 char *Paso_MPI_appendRankToFileName(const char *, int, int);
74
75 #endif /* INC_PASO_MPI */

  ViewVC Help
Powered by ViewVC 1.1.26