if((did = H5Dcreate2(fid , DATASETNAME, H5T_NATIVE_INT, f_sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) TEST_ERROR;
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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 COPYING file, which can be found at the root of the source code       *
 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
 * Programmer:  Pedro Vicente <pvn@hdfgroup.edu>
 *              April 7, 2008
 *
 * Purpose:     Tests the H5Dget_chunk_info API function
 *              This program writes a 4x4 dataset by iterating on 2x2 chunks
 *               at a time
 */
#include "h5test.h"
#define PRINT_DATA
#define H5FILE_NAME "chunk_info.h5"
#define DATASETNAME "2d"
#define RANK         2
int main( void )
    hid_t   fid;      /* file ID */
    hid_t   did;      /* dataset ID */
    hid_t   f_sid;    /* file space ID */
    hid_t   m_sid;    /* memory space ID */
    hid_t   pid;      /* property list ID */
    hsize_t start[2]; /* chunk location to start writing */
    hsize_t dims[2]  = { 4, 4};
    hsize_t chunk_dims[2] = { 2, 2 };
    int     chunk_data[2][2] = { {1, 1}, {1, 1} };
    int     buf[4][4];
    int     fillvalue = 0;
    int     i, j, ii, jj;
    /* create a new file using default properties. */
    if ((fid = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
    /* create the file space */
    if ((f_sid = H5Screate_simple(RANK, dims, dims)) < 0) TEST_ERROR;