mpioimpl.h 2.48 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/* 
 *
 *   Copyright (C) 1997 University of Chicago. 
 *   See COPYRIGHT notice in top-level directory.
 */


/* header file for MPI-IO implementation. not intended to be
   user-visible */ 

#ifndef MPIOIMPL_INCLUDE
#define MPIOIMPL_INCLUDE

#include "adio.h"
#include "mpio.h"

/* FIXME: We should be more restricted in what we include from MPICH2
   into ROMIO */
#ifdef ROMIO_INSIDE_MPICH2
#include "mpiimpl.h"
#include "mpiimplthread.h"

/* Use the routine versions of the nest macros, to avoid requiring 
   access to the MPIR_Process and MPIR_Thread structures */
#ifdef MPIR_Nest_incr
#undef MPIR_Nest_incr
#undef MPIR_Nest_decr
#endif

31
32
33
34
35
#ifndef MPICH_DEBUG_NESTING
/* These implement the nesting support expected by MPICH2; the primary
   purpose of these is to cause MPI routines to return error codes 
   instead of invoking an error handler (which would be incorrect,
   since the relevant MPI_File error handler should be invoked). */
36
37
void MPIR_Nest_incr_export(void);
void MPIR_Nest_decr_export(void);
38
39
40
41
42
43
44
45
46
47
48
#define MPIR_Nest_incr() MPIR_Nest_incr_export()
#define MPIR_Nest_decr() MPIR_Nest_decr_export()
#else
/* These implement the nesting support with additional code to 
   provide traces of nest increments and decrements, which are very
   helpful in finding errors in properly updating the nesting values */
void MPIR_Nest_incr_export_dbg(const char *, int);
void MPIR_Nest_decr_export_dbg(const char *, int);
#define MPIR_Nest_incr() MPIR_Nest_incr_export_dbg(__FILE__,__LINE__)
#define MPIR_Nest_decr() MPIR_Nest_decr_export_dbg(__FILE__,__LINE__)
#endif
49
50
51
52
53
54

#else /* not ROMIO_INSIDE_MPICH2 */
/* Any MPI implementation that wishes to follow the thread-safety and
   error reporting features provided by MPICH2 must implement these 
   four functions.  Defining these as empty should not change the behavior 
   of correct programs */
55
56
#define MPIU_THREAD_CS_ENTER(ALLFUNC,)
#define MPIU_THREAD_CS_EXIT(ALLFUNC,)
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#define MPIR_Nest_incr()
#define MPIR_Nest_decr()
#ifdef HAVE_WINDOWS_H
#define MPIU_UNREFERENCED_ARG(a) a
#else
#define MPIU_UNREFERENCED_ARG(a)
#endif
#endif /* ROMIO_INSIDE_MPICH2 */

/* info is a linked list of these structures */
struct MPIR_Info {
    int cookie;
    char *key, *value;
    struct MPIR_Info *next;
};

#define MPIR_INFO_COOKIE 5835657

MPI_Delete_function ADIOI_End_call;

77
78
79
80
/* common initialization routine */
void MPIR_MPIOInit(int * error_code);


81
82
83
84
85
86
87
88
#include "mpioprof.h"

#ifdef MPI_hpux
#  include "mpioinst.h"
#endif /* MPI_hpux */

#endif