Commit 0f06d7ac authored by Rob Latham's avatar Rob Latham Committed by Pavan Balaji
Browse files

remove MPIR_Type_get_contig_blocks

MPIR_Type_get_contig_blocks is buggy for certain datatypes (example:
HDF5 multi-dataset IO generated type results in a contig block count of
5 billion.  should be more like 200).  Nothing uses this function except
ROMIO's flattening code.  I'd like to see profiling suggesting the count
of contiguous blocks is a profitable short-circuit before spending a ton
of time debugging it.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <>
parent e289f45f
......@@ -733,13 +733,6 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_index)
/* MPICH can get us this value without all the envelope/contents calls */
MPI_Count blks;
MPIR_Type_get_contig_blocks(datatype, &blks);
*curr_index = blks;
return blks;
int i, n;
MPI_Count count=0, prev_index, num, basic_num;
int top_count, combiner, old_combiner, old_is_contig;
......@@ -1008,7 +1001,6 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i
return count;
/* removezeros() make a second pass over the
......@@ -559,9 +559,6 @@ int ADIOI_Error(ADIO_File fd, int error_code, char *string);
int MPIR_Err_setmsg( int, int, const char *, const char *, const char *, ... );
int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state);
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, MPI_Count nbytes);
MPI_Count MPIR_Type_get_contig_blocks(MPI_Datatype datatype, MPI_Count *nr_blocks_p);
int ADIOI_Uses_generic_read(ADIO_File fd);
int ADIOI_Uses_generic_write(ADIO_File fd);
int ADIOI_Err_create_code(const char *myname, const char *filename, int my_errno);
......@@ -29,8 +29,7 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/common/datatype/mpid_type_struct.c \
src/mpid/common/datatype/mpid_type_vector.c \
src/mpid/common/datatype/mpid_type_zerolen.c \
src/mpid/common/datatype/mpir_type_flatten.c \
# there are no AC_OUTPUT_FILES headers, so builddir is unnecessary
AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/common/datatype
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
#include <mpiimpl.h>
#include <mpid_dataloop.h>
#include <stdlib.h>
Input Parameters:
. type - MPI Datatype (must have been committed)
Output Parameters:
. nr_blocks_p - pointer to int in which to store the number of contiguous blocks in the type
Return Value:
0 on success, -1 on failure.
MPI_Count MPIR_Type_get_contig_blocks(MPI_Datatype type,
MPI_Count *nr_blocks_p)
MPID_Datatype *datatype_ptr;
*nr_blocks_p = 1;
return 0;
MPID_Datatype_get_ptr(type, datatype_ptr);
*nr_blocks_p = datatype_ptr->max_contig_blocks;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment