summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-27 23:11:19 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-09-03 01:27:40 (GMT)
commit53fcead7f1f506b72041d61bbeb78c88e56da359 (patch)
tree5c6a853b65d1c1f1304871f96fa3f0253f47e03e /src
parent910937e972a52d0c5d46b9544e26b369f2611e4b (diff)
downloadhdf5-53fcead7f1f506b72041d61bbeb78c88e56da359.zip
hdf5-53fcead7f1f506b72041d61bbeb78c88e56da359.tar.gz
hdf5-53fcead7f1f506b72041d61bbeb78c88e56da359.tar.bz2
Revert " Checkin of fix for CGNS bug"
This reverts commit 94c34773ceae5b30c4afb227d0385ebf4ab6ce28.
Diffstat (limited to 'src')
-rw-r--r--src/H5Cdbg.c112
-rw-r--r--src/H5Cmpio.c27
-rw-r--r--src/H5Cprivate.h5
-rw-r--r--src/H5FDmpi.c36
-rw-r--r--src/H5FDmpio.c4
-rw-r--r--src/H5FDprivate.h2
-rw-r--r--src/H5Fmpi.c28
-rw-r--r--src/H5Fprivate.h1
8 files changed, 8 insertions, 207 deletions
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 33e6a96..d820ca0 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -28,16 +28,12 @@
#include "H5Cmodule.h" /* This source code file is part of the H5C module */
-#define H5AC_FRIEND
-
-
-
/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5ACpkg.h" /* Metadata Cache */
+#include "H5ACprivate.h" /* Metadata Cache */
#include "H5Cpkg.h" /* Cache */
#include "H5Eprivate.h" /* Error Handling */
@@ -341,112 +337,6 @@ H5C_dump_cache_skip_list(H5C_t * cache_ptr, char * calling_fcn)
/*-------------------------------------------------------------------------
- * Function: H5C_dump_coll_write_list
- *
- * Purpose: Debugging routine that prints a summary of the contents of
- * the collective write skip list used by the metadata cache
- * in the parallel case to maintain a list of entries to write
- * collectively at a sync point.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 4/1/17
- *
- *-------------------------------------------------------------------------
- */
-#ifdef H5_HAVE_PARALLEL
-#ifndef NDEBUG
-herr_t
-H5C_dump_coll_write_list(H5C_t * cache_ptr, char * calling_fcn)
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
- int list_len;
- H5AC_aux_t * aux_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5SL_node_t * node_ptr = NULL;
-
- FUNC_ENTER_NOAPI_NOERR
-
- HDassert(cache_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->aux_ptr);
-
- aux_ptr = (H5AC_aux_t *)cache_ptr->aux_ptr;
-
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
-
- HDassert(calling_fcn != NULL);
-
- list_len = (int)H5SL_count(cache_ptr->coll_write_list);
-
- HDfprintf(stdout, "\n\nDumping MDC coll write list from %d:%s.\n",
- aux_ptr->mpi_rank, calling_fcn);
- HDfprintf(stdout, " slist len = %u.\n", cache_ptr->slist_len);
-
- if ( list_len > 0 ) {
-
- /* scan the collective write list generating the desired output */
- HDfprintf(stdout,
- "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
-
- i = 0;
-
- node_ptr = H5SL_first(cache_ptr->coll_write_list);
-
- if ( node_ptr != NULL )
-
- entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
-
- else
-
- entry_ptr = NULL;
-
- while ( entry_ptr != NULL ) {
-
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
-
- HDfprintf(stdout,
- "%s%d 0x%016llx %4lld %d/%d %d %s\n",
- cache_ptr->prefix, i,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->size),
- (int)(entry_ptr->is_protected),
- (int)(entry_ptr->is_pinned),
- (int)(entry_ptr->is_dirty),
- entry_ptr->type->name);
-
- /* HDfprintf(stdout, " node_ptr = 0x%llx, item = %p\n",
- (unsigned long long)node_ptr,
- H5SL_item(node_ptr));
- */
-
- node_ptr = H5SL_next(node_ptr);
-
- if ( node_ptr != NULL )
-
- entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
-
- else
-
- entry_ptr = NULL;
-
- i++;
-
- } /* end while */
- } /* end if */
-
- HDfprintf(stdout, "\n\n");
-
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_dump_coll_write_list() */
-#endif /* NDEBUG */
-#endif /* H5_HAVE_PARALLEL */
-
-
-/*-------------------------------------------------------------------------
* Function: H5C_set_prefix
*
* Purpose: Set the values of the prefix field of H5C_t. This
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index 199c494..22de465 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -946,7 +946,6 @@ H5C__collective_write(H5F_t *f)
/* Get number of entries in collective write list */
count = (int)H5SL_count(cache_ptr->coll_write_list);
-
if(count > 0) {
H5FD_mpio_xfer_t xfer_mode = H5FD_MPIO_COLLECTIVE;
H5SL_node_t *node;
@@ -981,7 +980,6 @@ H5C__collective_write(H5F_t *f)
node = H5SL_next(node);
i = 1;
while(node) {
-
if(NULL == (entry_ptr = (H5C_cache_entry_t *)H5SL_item(node)))
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item")
@@ -998,18 +996,14 @@ H5C__collective_write(H5F_t *f)
/* Create memory MPI type */
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed(count, length_array, buf_array, MPI_BYTE, &btype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
-
btype_created = TRUE;
-
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&btype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
/* Create file MPI type */
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed(count, length_array, offset_array, MPI_BYTE, &ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
-
ftype_created = TRUE;
-
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
@@ -1024,10 +1018,8 @@ H5C__collective_write(H5F_t *f)
} /* end if */
else {
MPI_Status mpi_stat;
- MPI_File *mpi_fh_p;
+ MPI_File mpi_fh_p;
MPI_File mpi_fh;
- MPI_Info *info_p;
- MPI_Info info;
/* This should be rewritten to call H5F_block_write, with the correct
* buffer and file datatypes (null ones). -QAK, 2018/02/21
@@ -1037,15 +1029,8 @@ H5C__collective_write(H5F_t *f)
mpi_fh = *(MPI_File*)mpi_fh_p;
- if(H5F_get_mpi_info(f, &info_p) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get mpi file info")
-
- info = *info_p;
-
- /* just to match up with the 1st MPI_File_set_view from
- * H5FD_mpio_write()
- */
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
+ /* just to match up with the 1st MPI_File_set_view from H5FD_mpio_write() */
+ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
/* just to match up with MPI_File_write_at_all from H5FD_mpio_write() */
@@ -1053,10 +1038,8 @@ H5C__collective_write(H5F_t *f)
if(MPI_SUCCESS != (mpi_code = MPI_File_write_at_all(mpi_fh, (MPI_Offset)0, NULL, 0, MPI_BYTE, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at_all failed", mpi_code)
- /* just to match up with the 2nd MPI_File_set_view (reset) in
- * H5FD_mpio_write()
- */
- if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", info)))
+ /* just to match up with the 2nd MPI_File_set_view (reset) in H5FD_mpio_write() */
+ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(mpi_fh, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
} /* end else */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index f82f8df..8b42949 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -2333,12 +2333,9 @@ H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name);
H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr);
H5_DLL hbool_t H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring);
H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn);
-#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5C_dump_coll_write_list(H5C_t * cache_ptr, char * calling_fcn);
-#endif /* H5_HAVE_PARALLEL */
H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr,
void **entry_ptr_ptr);
-H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
+H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
haddr_t child_addr, hbool_t *fd_exists_ptr);
H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr,
const H5C_class_t *expected_type, hbool_t *in_cache_ptr,
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 43fa340..3cdbc32 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -141,42 +141,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_get_mpi_info
- *
- * Purpose: Retrieves the file's mpi info
- *
- * Return: Success: SUCCEED
- *
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 4/4/17
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5FD_get_mpi_info(H5FD_t *file, void** mpi_info)
-{
- const H5FD_class_mpi_t *cls;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert(file);
- cls = (const H5FD_class_mpi_t *)(file->cls);
- HDassert(cls);
- HDassert(cls->get_mpi_info); /* All MPI drivers must implement this */
-
- /* Dispatch to driver */
- if((ret_value = (cls->get_mpi_info)(file, mpi_info)) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_mpi_info request failed")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_get_mpi_info() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5FD_mpi_MPIOff_to_haddr
*
* Purpose: Convert an MPI_Offset value to haddr_t.
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 9475093..319e528 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -91,7 +91,6 @@ static herr_t H5FD__mpio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
static int H5FD__mpio_mpi_rank(const H5FD_t *_file);
static int H5FD__mpio_mpi_size(const H5FD_t *_file);
static MPI_Comm H5FD__mpio_communicator(const H5FD_t *_file);
-static herr_t H5FD__mpio_get_info(H5FD_t *_file, void** mpi_info);
/* The MPIO file driver information */
static const H5FD_class_mpi_t H5FD_mpio_g = {
@@ -131,8 +130,7 @@ static const H5FD_class_mpi_t H5FD_mpio_g = {
}, /* End of superclass information */
H5FD__mpio_mpi_rank, /*get_rank */
H5FD__mpio_mpi_size, /*get_size */
- H5FD__mpio_communicator, /*get_comm */
- H5FD__mpio_get_info /*get_info */
+ H5FD__mpio_communicator /*get_comm */
};
#ifdef H5FDmpio_DEBUG
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 7d5b66d..c5d1be1 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -51,7 +51,6 @@ typedef struct H5FD_class_mpi_t {
int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
- herr_t (*get_mpi_info)(H5FD_t *file, void** mpi_info); /* get MPI_Info for a file */
} H5FD_class_mpi_t;
#endif
@@ -163,7 +162,6 @@ H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag);
H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
-H5_DLL herr_t H5FD_get_mpi_info(H5FD_t *file, void** file_info);
#endif /* H5_HAVE_PARALLEL */
#endif /* !_H5FDprivate_H */
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 8189821..02f93f7 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -434,33 +434,5 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_mpi_retrieve_comm */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5F_get_mpi_info
- *
- * Purpose: Retrieves MPI File info.
- *
- * Return: Success: The size (positive)
- * Failure: Negative
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5F_get_mpi_info(const H5F_t *f, MPI_Info **f_info)
-{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI(FAIL)
-
- HDassert(f && f->shared);
-
- /* Dispatch to driver */
- if ((ret_value = H5FD_get_mpi_info(f->shared->lf, (void **)f_info)) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get mpi file info")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_get_mpi_info() */
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 9deba8c..6e80f4b 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -861,7 +861,6 @@ H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
H5_DLL int H5F_shared_mpi_get_size(const H5F_shared_t *f_sh);
H5_DLL int H5F_mpi_get_size(const H5F_t *f);
H5_DLL herr_t H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm);
-H5_DLL herr_t H5F_get_mpi_info(const H5F_t *f, MPI_Info **f_info);
H5_DLL herr_t H5F_get_mpi_atomicity(H5F_t *file, hbool_t *flag);
H5_DLL herr_t H5F_set_mpi_atomicity(H5F_t *file, hbool_t flag);
#endif /* H5_HAVE_PARALLEL */
54f25c0936c3356a9'/>
path: root/doc/GetIndex.3
blob: 7d138ebd8ddf5d98aa37b76f19841e11c5ef2159 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
'\"
'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id: GetIndex.3,v 1.24 2008/10/19 16:22:20 dkf Exp $
'\" 
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct \- lookup string in table of keywords
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_GetIndexFromObj\fR(\fIinterp, objPtr, tablePtr, msg, flags,
indexPtr\fR)
.sp
int
\fBTcl_GetIndexFromObjStruct\fR(\fIinterp, objPtr, structTablePtr, offset,
                          msg, flags, indexPtr\fR)
.SH ARGUMENTS
.AS "const char" *structTablePtr in/out
.AP Tcl_Interp *interp in
Interpreter to use for error reporting; if NULL, then no message is
provided on errors.
.AP Tcl_Obj *objPtr in/out
The string value of this object is used to search through \fItablePtr\fR.
The internal representation is modified to hold the index of the matching
table entry.
.AP "const char *const" *tablePtr in
An array of null-terminated strings.  The end of the array is marked
by a NULL string pointer.
.AP "const void" *structTablePtr in
An array of arbitrary type, typically some \fBstruct\fR type.
The first member of the structure must be a null-terminated string.
The size of the structure is given by \fIoffset\fR.
.AP int offset in
The offset to add to structTablePtr to get to the next entry.
The end of the array is marked by a NULL string pointer.
.AP "const char" *msg in
Null-terminated string describing what is being looked up, such as
\fBoption\fR.  This string is included in error messages.
.AP int flags in
OR-ed combination of bits providing additional information for
operation.  The only bit that is currently defined is \fBTCL_EXACT\fR.
.AP int *indexPtr out
The index of the string in \fItablePtr\fR that matches the value of
\fIobjPtr\fR is returned here.
.BE
.SH DESCRIPTION
.PP
This procedure provides an efficient way for looking up keywords,
switch names, option names, and similar things where the value of
an object must be one of a predefined set of values.
\fIObjPtr\fR is compared against each of
the strings in \fItablePtr\fR to find a match.  A match occurs if
\fIobjPtr\fR's string value is identical to one of the strings in
\fItablePtr\fR, or if it is a non-empty unique abbreviation
for exactly one of the strings in \fItablePtr\fR and the
\fBTCL_EXACT\fR flag was not specified; in either case
the index of the matching entry is stored at \fI*indexPtr\fR
and \fBTCL_OK\fR is returned.
.PP
If there is no matching entry,
\fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's
result if \fIinterp\fR is not NULL.  \fIMsg\fR is included in the
error message to indicate what was being looked up.  For example,
if \fImsg\fR is \fBoption\fR the error message will have a form like
.QW "\fBbad option \N'34'firt\N'34': must be first, second, or third\fR" .
.PP
If \fBTcl_GetIndexFromObj\fR completes successfully it modifies the
internal representation of \fIobjPtr\fR to hold the address of
the table and the index of the matching entry.  If \fBTcl_GetIndexFromObj\fR
is invoked again with the same \fIobjPtr\fR and \fItablePtr\fR
arguments (e.g. during a reinvocation of a Tcl command), it returns
the matching index immediately without having to redo the lookup
operation.  Note: \fBTcl_GetIndexFromObj\fR assumes that the entries
in \fItablePtr\fR are static: they must not change between
invocations.  If the value of \fIobjPtr\fR is the empty string,
\fBTcl_GetIndexFromObj\fR will treat it as a non-matching value
and return \fBTCL_ERROR\fR.
.PP
\fBTcl_GetIndexFromObjStruct\fR works just like
\fBTcl_GetIndexFromObj\fR, except that instead of treating
\fItablePtr\fR as an array of string pointers, it treats it as a
pointer to the first string in a series of strings that have
\fIoffset\fR bytes between them (i.e. that there is a pointer to the
first array of characters at \fItablePtr\fR, a pointer to the second
array of characters at \fItablePtr\fR+\fIoffset\fR bytes, etc.)
This is particularly useful when processing things like
\fBTk_ConfigurationSpec\fR, whose string keys are in the same place in
each of several array elements.
.SH "SEE ALSO"
prefix(n), Tcl_WrongNumArgs(3)
.SH KEYWORDS
index, object, table lookup