1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3 *
4 * Copyright (C) 1997 University of Chicago.
5 * Copyright (c) 2018 IBM Corporation. All rights reserved.
6 * $COPYRIGHT$
7 * See COPYRIGHT notice in top-level directory.
8 */
9
10
11 /* header file for MPI-IO implementation. not intended to be
12 user-visible */
13
14 #ifndef MPIOIMPL_INCLUDE
15 #define MPIOIMPL_INCLUDE
16
17 #include "adio.h"
18 #include "mpio.h"
19
20 #ifdef ROMIO_INSIDE_MPICH
21 #include "glue_romio.h"
22
23 #define ROMIO_THREAD_CS_ENTER() MPIR_Ext_cs_enter()
24 #define ROMIO_THREAD_CS_EXIT() MPIR_Ext_cs_exit()
25 #define ROMIO_THREAD_CS_YIELD() MPIR_Ext_cs_yield()
26
27 /* committed datatype checking support in ROMIO */
28 #define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) \
29 do { \
30 err_ = MPIR_Ext_datatype_iscommitted(dtype_); \
31 } while (0)
32
33 #else /* not ROMIO_INSIDE_MPICH */
34 /* Any MPI implementation that wishes to follow the thread-safety and
35 error reporting features provided by MPICH must implement these
36 four functions. Defining these as empty should not change the behavior
37 of correct programs */
38 #define ROMIO_THREAD_CS_ENTER()
39 #define ROMIO_THREAD_CS_EXIT()
40 #define ROMIO_THREAD_CS_YIELD()
41 /* The MPI_DATATYPE_ISCOMMITTED macro now always sets err_=0.
42 This is an optimistic approach for Open MPI, but it is likely other
43 upper layers already checked the datatype was committed.
44 Not setting err_ is incorrect since it can lead to use of
45 uninitialized variable.*/
46 #define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do { err_ = 0; } while (0)
47 #ifdef HAVE_WINDOWS_H
48 #define MPIU_UNREFERENCED_ARG(a) a
49 #else
50 #define MPIU_UNREFERENCED_ARG(a)
51 #endif
52 #endif /* ROMIO_INSIDE_MPICH */
53
54 /* info is a linked list of these structures */
55 struct MPIR_Info {
56 int cookie;
57 char *key, *value;
58 struct MPIR_Info *next;
59 };
60
61 #define MPIR_INFO_COOKIE 5835657
62
63 MPI_Comm_delete_attr_function ADIOI_End_call;
64
65 /* common initialization routine */
66 void MPIR_MPIOInit(int * error_code);
67
68 #ifdef HAVE_MPIIO_CONST
69 #define ROMIO_CONST const
70 #else
71 #define ROMIO_CONST
72 #endif
73
74 #include "mpiu_external32.h"
75
76
77 #include "mpioprof.h"
78
79 #ifdef MPI_hpux
80 # include "mpioinst.h"
81 #endif /* MPI_hpux */
82
83 #endif
84