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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1343 - (hide annotations)
Wed Nov 14 02:48:02 2007 UTC (11 years, 9 months ago) by ksteube
Original Path: trunk/paso/src/Paso_MPI.h
File MIME type: text/plain
File size: 1646 byte(s)
First cut implementation of mesh.dump() using NetCDF.  TagMap not
saved yet.  The code for Points probably works but has not been tested.

1 bcumming 731
2 ksteube 1312 /* $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 bcumming 731 #include "Common.h"
20 ksteube 1312 #include "Paso.h"
21 bcumming 731
22 bcumming 790 #ifdef PASO_MPI
23 ksteube 1312 #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 ksteube 971
32 ksteube 1312 typedef int Paso_MPI_rank;
33 bcumming 790
34 bcumming 731 #define PASO_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
35    
36     /* Datatypes */
37 ksteube 1312 struct Paso_MPIInfo {
38 bcumming 731 dim_t reference_counter;
39     int size;
40 ksteube 1312 Paso_MPI_rank rank;
41 bcumming 731 MPI_Comm comm;
42 ksteube 1312 int msg_tag_counter;
43 bcumming 731 };
44    
45     typedef struct Paso_MPIInfo Paso_MPIInfo;
46    
47     /* Function prototypes */
48     Paso_MPIInfo* Paso_MPIInfo_alloc( MPI_Comm comm );
49 ksteube 1312 void Paso_MPIInfo_free( Paso_MPIInfo* );
50 bcumming 731 Paso_MPIInfo *Paso_MPIInfo_getReference( Paso_MPIInfo* in );
51 ksteube 1312 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 ksteube 1343 char *Paso_MPI_appendRankToFileName(char *, int, int);
57 bcumming 731
58 gross 1028 #endif /* INC_PASO_MPI */

  ViewVC Help
Powered by ViewVC 1.1.26