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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 8 months ago) by ksteube
Original Path: trunk/paso/src/Paso_MPI.h
File MIME type: text/plain
File size: 1617 byte(s)
Copyright updated in all files

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 Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
48 void Paso_MPIInfo_free( Paso_MPIInfo* );
49 Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
50 int Paso_MPIInfo_initialized( void );
51 index_t Paso_MPIInfo_mod(index_t n, index_t k);
52 dim_t Paso_MPIInfo_setDistribution(Paso_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
53 void Paso_MPIInfo_Split( Paso_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
54 bool_t Paso_MPIInfo_noError( Paso_MPIInfo *mpi_info);
55 char *Paso_MPI_appendRankToFileName(const char *, int, int);
56
57 #endif /* INC_PASO_MPI */

  ViewVC Help
Powered by ViewVC 1.1.26