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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2068 - (hide annotations)
Thu Nov 20 09:11:01 2008 UTC (10 years, 11 months ago) by phornby
File MIME type: text/plain
File size: 1729 byte(s)
Interim commit getting paso ready for becoming a shared library.


1 bcumming 731
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
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 ksteube 1312
14 ksteube 1811
15 ksteube 1312 #ifndef INC_PASO_MPI
16     #define INC_PASO_MPI
17    
18 bcumming 731 #include "Common.h"
19 ksteube 1312 #include "Paso.h"
20 bcumming 731
21 bcumming 790 #ifdef PASO_MPI
22 ksteube 1312 #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 ksteube 971
31 ksteube 1312 typedef int Paso_MPI_rank;
32 bcumming 790
33 bcumming 731 #define PASO_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
34    
35     /* Datatypes */
36 ksteube 1312 struct Paso_MPIInfo {
37 bcumming 731 dim_t reference_counter;
38     int size;
39 ksteube 1312 Paso_MPI_rank rank;
40 bcumming 731 MPI_Comm comm;
41 ksteube 1312 int msg_tag_counter;
42 bcumming 731 };
43    
44     typedef struct Paso_MPIInfo Paso_MPIInfo;
45    
46     /* Function prototypes */
47 phornby 2068
48     PASO_DLL_API
49 bcumming 731 Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
50 phornby 2068
51     PASO_DLL_API
52 ksteube 1312 void Paso_MPIInfo_free( Paso_MPIInfo* );
53 phornby 2068
54     PASO_DLL_API
55 bcumming 731 Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
56 phornby 2068
57     PASO_DLL_API
58 ksteube 1312 int Paso_MPIInfo_initialized( void );
59 phornby 2068
60     PASO_DLL_API
61 ksteube 1312 index_t Paso_MPIInfo_mod(index_t n, index_t k);
62 phornby 2068
63     PASO_DLL_API
64 ksteube 1312 dim_t Paso_MPIInfo_setDistribution(Paso_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
65 phornby 2068
66     PASO_DLL_API
67 ksteube 1312 void Paso_MPIInfo_Split( Paso_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
68     bool_t Paso_MPIInfo_noError( Paso_MPIInfo *mpi_info);
69 phornby 2068
70     PASO_DLL_API
71 phornby 1628 char *Paso_MPI_appendRankToFileName(const char *, int, int);
72 bcumming 731
73 gross 1028 #endif /* INC_PASO_MPI */

  ViewVC Help
Powered by ViewVC 1.1.26