--- ph5example.c	2008-04-07 09:10:18.347674003 -0500
+++ ph5example2.c	2008-04-07 15:21:25.388238627 -0500
@@ -63,8 +63,8 @@
 
 /* Constants definitions */
 /* 24 is a multiple of 2, 3, 4, 6, 8, 12.  Neat for parallel tests. */
-#define SPACE1_DIM1	24
-#define SPACE1_DIM2	24
+#define SPACE1_DIM1	32000
+#define SPACE1_DIM2	32000
 #define SPACE1_RANK	2
 #define DATASETNAME1	"Data1"
 #define DATASETNAME2	"Data2"
@@ -245,13 +245,16 @@
     hid_t dataset1, dataset2;	/* Dataset ID */
     hsize_t dims1[SPACE1_RANK] =
 	{SPACE1_DIM1,SPACE1_DIM2};	/* dataspace dim sizes */
-    DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2];	/* data buffer */
+  DATATYPE *data_array1;	/* data buffer */
 
     hsize_t start[SPACE1_RANK];			/* for hyperslab setting */
     hsize_t count[SPACE1_RANK], stride[SPACE1_RANK];	/* for hyperslab setting */
 
     herr_t ret;         	/* Generic return value */
 
+    data_array1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_array1 == 0) {printf("Can't malloc\n"); exit -1;}
+
     MPI_Comm comm = MPI_COMM_WORLD;
     MPI_Info info = MPI_INFO_NULL;
 
@@ -318,7 +321,7 @@
         (unsigned long)(count[0]*count[1]));
 
     /* put some trivial data in the data_array */
-    dataset_fill(start, count, stride, &data_array1[0][0]);
+    dataset_fill(start, count, stride, data_array1);
     MESG("data_array initialized");
 
     /* create a file dataspace independently */
@@ -373,14 +376,20 @@
     hid_t file_dataspace;	/* File dataspace ID */
     hid_t mem_dataspace;	/* memory dataspace ID */
     hid_t dataset1, dataset2;	/* Dataset ID */
-    DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2];	/* data buffer */
-    DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2];	/* expected data buffer */
+    DATATYPE *data_array1;	/* data buffer */
+    DATATYPE *data_origin1;	/* expected data buffer */
 
     hsize_t start[SPACE1_RANK];			/* for hyperslab setting */
     hsize_t count[SPACE1_RANK], stride[SPACE1_RANK];	/* for hyperslab setting */
 
     herr_t ret;         	/* Generic return value */
 
+    data_array1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_array1 == 0) {printf("Can't malloc\n"); exit -1;}
+
+    data_origin1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_origin1 == 0) {printf("Can't malloc\n"); exit -1;}
+
     MPI_Comm comm = MPI_COMM_WORLD;
     MPI_Info info = MPI_INFO_NULL;
 
@@ -437,7 +446,7 @@
     assert (mem_dataspace != FAIL);
 
     /* fill dataset with test data */
-    dataset_fill(start, count, stride, &data_origin1[0][0]);
+    dataset_fill(start, count, stride, data_origin1);
 
     /* read data independently */
     ret = H5Dread(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
@@ -445,7 +454,7 @@
     assert(ret != FAIL);
 
     /* verify the read data with original expected data */
-    ret = dataset_vrfy(start, count, stride, &data_array1[0][0], &data_origin1[0][0]);
+    ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
     assert(ret != FAIL);
 
     /* read data independently */
@@ -454,7 +463,7 @@
     assert(ret != FAIL);
 
     /* verify the read data with original expected data */
-    ret = dataset_vrfy(start, count, stride, &data_array1[0][0], &data_origin1[0][0]);
+    ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
     assert(ret == 0);
 
     /* close dataset collectively */
@@ -492,13 +501,16 @@
     hid_t dataset1, dataset2;	/* Dataset ID */
     hsize_t dims1[SPACE1_RANK] =
 	{SPACE1_DIM1,SPACE1_DIM2};	/* dataspace dim sizes */
-    DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2];	/* data buffer */
+    DATATYPE *data_array1;	/* data buffer */
 
     hsize_t start[SPACE1_RANK];			/* for hyperslab setting */
     hsize_t count[SPACE1_RANK], stride[SPACE1_RANK];	/* for hyperslab setting */
 
     herr_t ret;         	/* Generic return value */
 
+    data_array1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_array1 == 0) {printf("Can't malloc\n"); exit -1;}
+
     MPI_Comm comm = MPI_COMM_WORLD;
     MPI_Info info = MPI_INFO_NULL;
 
@@ -573,11 +585,11 @@
     assert (mem_dataspace != FAIL);
 
     /* fill the local slab with some trivial data */
-    dataset_fill(start, count, stride, &data_array1[0][0]);
+    dataset_fill(start, count, stride, data_array1);
     MESG("data_array initialized");
     if (verbose){
 	MESG("data_array created");
-	dataset_print(start, count, stride, &data_array1[0][0]);
+	dataset_print(start, count, stride, data_array1);
     }
 
     /* set up the collective transfer properties list */
@@ -609,11 +621,11 @@
         (unsigned long)(count[0]*count[1]));
 
     /* put some trivial data in the data_array */
-    dataset_fill(start, count, stride, &data_array1[0][0]);
+    dataset_fill(start, count, stride, data_array1);
     MESG("data_array initialized");
     if (verbose){
 	MESG("data_array created");
-	dataset_print(start, count, stride, &data_array1[0][0]);
+	dataset_print(start, count, stride, data_array1);
     }
 
     /* create a file dataspace independently */
@@ -630,11 +642,11 @@
     assert (mem_dataspace != FAIL);
 
     /* fill the local slab with some trivial data */
-    dataset_fill(start, count, stride, &data_array1[0][0]);
+    dataset_fill(start, count, stride, data_array1);
     MESG("data_array initialized");
     if (verbose){
 	MESG("data_array created");
-	dataset_print(start, count, stride, &data_array1[0][0]);
+	dataset_print(start, count, stride, data_array1);
     }
 
     /* set up the collective transfer properties list */
@@ -691,14 +703,20 @@
     hid_t file_dataspace;	/* File dataspace ID */
     hid_t mem_dataspace;	/* memory dataspace ID */
     hid_t dataset1, dataset2;	/* Dataset ID */
-    DATATYPE data_array1[SPACE1_DIM1][SPACE1_DIM2];	/* data buffer */
-    DATATYPE data_origin1[SPACE1_DIM1][SPACE1_DIM2];	/* expected data buffer */
+    DATATYPE *data_array1;	/* data buffer */
+    DATATYPE *data_origin1;	/* expected data buffer */
 
     hsize_t start[SPACE1_RANK];			/* for hyperslab setting */
     hsize_t count[SPACE1_RANK], stride[SPACE1_RANK];	/* for hyperslab setting */
 
     herr_t ret;         	/* Generic return value */
 
+    data_array1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_array1 == 0) {printf("Can't malloc\n"); exit -1;}
+
+    data_origin1 = (DATATYPE*) malloc(sizeof(DATATYPE)*SPACE1_DIM1*SPACE1_DIM2/mpi_size);
+    if(data_origin1 == 0) {printf("Can't malloc\n"); exit -1;}
+
     MPI_Comm comm = MPI_COMM_WORLD;
     MPI_Info info = MPI_INFO_NULL;
 
@@ -766,11 +784,11 @@
     assert (mem_dataspace != FAIL);
 
     /* fill dataset with test data */
-    dataset_fill(start, count, stride, &data_origin1[0][0]);
+    dataset_fill(start, count, stride, data_origin1);
     MESG("data_array initialized");
     if (verbose){
 	MESG("data_array created");
-	dataset_print(start, count, stride, &data_array1[0][0]);
+	dataset_print(start, count, stride, data_array1);
     }
 
     /* set up the collective transfer properties list */
@@ -787,7 +805,7 @@
     MESG("H5Dread succeed");
 
     /* verify the read data with original expected data */
-    ret = dataset_vrfy(start, count, stride, &data_array1[0][0], &data_origin1[0][0]);
+    ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
     assert(ret != FAIL);
 
     /* release all temporary handles. */
@@ -819,11 +837,11 @@
     assert (mem_dataspace != FAIL);
 
     /* fill dataset with test data */
-    dataset_fill(start, count, stride, &data_origin1[0][0]);
+    dataset_fill(start, count, stride, data_origin1);
     MESG("data_array initialized");
     if (verbose){
 	MESG("data_array created");
-	dataset_print(start, count, stride, &data_array1[0][0]);
+	dataset_print(start, count, stride, data_array1);
     }
 
     /* set up the collective transfer properties list */
@@ -840,7 +858,7 @@
     MESG("H5Dread succeed");
 
     /* verify the read data with original expected data */
-    ret = dataset_vrfy(start, count, stride, &data_array1[0][0], &data_origin1[0][0]);
+    ret = dataset_vrfy(start, count, stride, data_array1, data_origin1);
     assert(ret != FAIL);
 
     /* release all temporary handles. */
