Escript
Revision_4320
Main Page
Namespaces
Classes
Files
File List
File Members
esysUtils
src
Esys_MPI.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 by University of Queensland
5
* http://www.uq.edu.au
6
*
7
* Primary Business: Queensland, Australia
8
* Licensed under the Open Software License version 3.0
9
* http://www.opensource.org/licenses/osl-3.0.php
10
*
11
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12
* Development since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
17
#ifndef INC_ESYS_MPI
18
#define INC_ESYS_MPI
19
20
#include "
system_dep.h
"
21
#include "
types.h
"
22
23
#ifdef ESYS_MPI
24
#include "
mpi_C.h
"
25
#else
26
typedef
int
MPI_Comm
;
27
typedef
int
MPI_Request
;
28
#define MPI_INT 6
29
#define MPI_DOUBLE 11
30
#define MPI_COMM_WORLD 91
31
#endif
32
33
typedef
int
Esys_MPI_rank
;
34
35
#define ESYS_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
36
37
/* Datatypes */
38
40
struct
Esys_MPIInfo
{
41
dim_t
reference_counter
;
42
int
size
;
43
Esys_MPI_rank
rank
;
44
MPI_Comm
comm
;
45
int
msg_tag_counter
;
46
};
47
48
typedef
struct
Esys_MPIInfo
Esys_MPIInfo
;
49
50
/* Function prototypes */
51
52
ESYSUTILS_DLL_API
53
Esys_MPIInfo
*
Esys_MPIInfo_alloc
(
MPI_Comm
comm
);
54
55
ESYSUTILS_DLL_API
56
void
Esys_MPIInfo_free
(
Esys_MPIInfo
* );
57
58
ESYSUTILS_DLL_API
59
Esys_MPIInfo
*
Esys_MPIInfo_getReference
(
Esys_MPIInfo
* in );
60
61
ESYSUTILS_DLL_API
62
int
Esys_MPIInfo_initialized
(
void
);
63
64
ESYSUTILS_DLL_API
65
index_t
Esys_MPIInfo_mod
(
index_t
n,
index_t
k);
66
67
ESYSUTILS_DLL_API
68
dim_t
Esys_MPIInfo_setDistribution
(
Esys_MPIInfo
* in ,
index_t
min_id,
index_t
max_id,
index_t
* distribution);
69
70
ESYSUTILS_DLL_API
71
void
Esys_MPIInfo_Split
(
Esys_MPIInfo
*mpi_info,
dim_t
n,
dim_t
* local_N,
index_t
* offset);
72
73
ESYSUTILS_DLL_API
74
bool_t
Esys_MPIInfo_noError
(
Esys_MPIInfo
*mpi_info);
75
76
ESYSUTILS_DLL_API
77
char
*
Esys_MPI_appendRankToFileName
(
const
char
*,
int
,
int
);
78
79
#endif
/* INC_ESYS_MPI */
Generated on Fri Mar 15 2013 14:07:50 for Escript by
1.8.1.2