parallel_access_dataset(const char *filename, int chunk_factor, access_type action, hid_t *file_id, hid_t *dataset)
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
 * This verifies if the storage space allocation methods are compatible between
 * serial and parallel modes.
 *
 * Created by: Christian Chilan and Albert Cheng
 * Date: 2006/05/25
 */
#include "testphdf5.h"
static int  mpi_size, mpi_rank;
#define DSET_NAME "ExtendibleArray"
#define CHUNK_SIZE  1000        /* #elements per chunk */
#define CHUNK_FACTOR    200     /* default dataset size in terms of chunks */
#define CLOSE           1
#define NO_CLOSE        0
static MPI_Offset
get_filesize(const char *filename)
    int     mpierr;
    MPI_File    fd;
    MPI_Offset  filesize;
    mpierr = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY,
    MPI_INFO_NULL, &fd);
    VRFY((mpierr == MPI_SUCCESS), "");
    mpierr = MPI_File_get_size(fd, &filesize);
    VRFY((mpierr == MPI_SUCCESS), "");
    mpierr = MPI_File_close(&fd);
    VRFY((mpierr == MPI_SUCCESS), "");
    return(filesize);