forked from Unidata/netcdf-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tst_small.c
596 lines (514 loc) · 18.3 KB
/
tst_small.c
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
/* This is part of the netCDF package. Copyright 2005 University
Corporation for Atmospheric Research/Unidata See COPYRIGHT file for
conditions of use. See www.unidata.ucar.edu for more info.
Test small files.
$Id: tst_small.c 2796 2014-10-28 03:40:29Z wkliao $
*/
#include "config.h"
#include <nc_tests.h>
#include "err_macros.h"
#include <netcdf.h>
#ifdef USE_PNETCDF
#include <netcdf_par.h>
#endif
/* Test everything for classic, 64-bit offset, 64-bit data files. If netcdf-4 is
* included, that means another whole round of testing. */
#define NUM_FORMATS (5)
#define ATT_NAME "Atom"
#define MAX_LEN 7
#define ERR2 { \
err++; \
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d (%s)\n", \
__FILE__, __LINE__, nc_strerror(stat)); \
exit(1); \
}
#ifdef USE_PNETCDF
#define FMTCHECK {\
int format; \
nc_inq_format_extended(ncid,&format,NULL); \
if (format == NC_FORMATX_PNETCDF) { \
if (nc_var_par_access(ncid, NC_GLOBAL, NC_COLLECTIVE)) ERR;\
}\
}
#else
#define FMTCHECK
#endif
static int file_create(const char *filename, int cmode, int *ncid)
{
int err;
/* get the default file format */
int default_format;
nc_set_default_format(NC_FORMAT_CLASSIC, &default_format);
/* set it back to the default */
nc_set_default_format(default_format, NULL);
#ifdef USE_PNETCDF
if (default_format == NC_FORMAT_CLASSIC ||
default_format == NC_FORMAT_64BIT_OFFSET
#ifdef ENABLE_CDF5
|| default_format == NC_FORMAT_64BIT_DATA
#endif
)
err = nc_create_par(filename, cmode|NC_PNETCDF, MPI_COMM_WORLD, MPI_INFO_NULL, ncid);
else
#endif
err = nc_create(filename, cmode, ncid);
return err;
}
static int file_open(const char *filename, int omode, int *ncid)
{
int err;
/* get the default file format */
int default_format;
err = nc_set_default_format(NC_FORMAT_CLASSIC, &default_format);
/* set it back to the default */
err = nc_set_default_format(default_format, NULL);
#ifdef USE_PNETCDF
if (default_format == NC_FORMAT_CLASSIC ||
default_format == NC_FORMAT_64BIT_OFFSET ||
default_format == NC_FORMAT_64BIT_DATA)
err = nc_open_par(filename, omode|NC_PNETCDF, MPI_COMM_WORLD, MPI_INFO_NULL, ncid);
else
#endif
err = nc_open(filename, omode, ncid);
return err;
}
static int
test_small_atts(const char *testfile)
{
int ncid;
char att[MAX_LEN + 1], att_in[MAX_LEN + 1], source[MAX_LEN + 1] = "0123456";
int ndims, nvars, natts, unlimdimid;
size_t len_in;
int t, f;
/* Run this with and without fill mode. */
for (f = 0; f < 2; f++)
{
/* Create small files with an attribute that grows by one each
* time. */
for (t = 1; t < MAX_LEN; t++)
{
/* Create null-terminated text string of correct length. */
strncpy(att, source, t);
att[t] = '\0';
/* Create a file with one attribute. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_put_att_text(ncid, NC_GLOBAL, ATT_NAME, t + 1, att)) ERR;
if (f && nc_set_fill(ncid, NC_NOFILL, NULL)) ERR;
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
if (ndims != 0 && nvars != 0 && natts != 1 && unlimdimid != -1) ERR;
if (nc_inq_attlen(ncid, NC_GLOBAL, ATT_NAME, &len_in)) ERR;
if (len_in != t + 1) ERR;
if (nc_get_att_text(ncid, NC_GLOBAL, ATT_NAME, att_in)) ERR;
if (strncmp(att_in, att, t)) ERR;
if (nc_close(ncid)) ERR;
}
}
return 0;
}
#define DIM1_NAME "Time"
#define DIM2_NAME "DataStrLen"
#define VAR_NAME "Times"
#define STR_LEN 19
#define NUM_VALS 2
#define NDIMS 2
#define TITLE " OUTPUT FROM WRF V2.0.3.1 MODEL"
#define ATT_NAME2 "TITLE"
/* Test a small file with an unlimited dimension. NOTE: Normally I
* write a NULL terminator for my attributes and text strings, but
* this reproduces a bug that a fortran user sent us. So string data
* are written to the file without null terminators. - Ed */
static int
test_small_unlim(const char *testfile)
{
int ncid, dimids[NDIMS], varid, stat;
char data[NUM_VALS][STR_LEN + 1], data_in[NUM_VALS][STR_LEN];
int ndims, nvars, natts, unlimdimid;
size_t i, start[NDIMS], count[NDIMS];
/* Create null-terminated text strings of correct length. */
/*for (i = 0; i < NUM_VALS; i++)
strcpy(data[i], source);*/
strcpy(data[0], "2005-04-11_12:00:00");
strcpy(data[1], "2005-04-11_13:00:00");
/* Create a file with two dimensions, one unlimited, and one
* var, and a global att. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, dimids)) ERR;
if (nc_def_dim(ncid, DIM2_NAME, STR_LEN, &dimids[1])) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 2, dimids, &varid)) ERR;
if (nc_put_att_text(ncid, NC_GLOBAL, ATT_NAME2, strlen(TITLE), TITLE)) ERR;
if (nc_enddef(ncid)) ERR;
/* Write some records of var data. */
count[0] = 1;
count[1] = STR_LEN;
start[1] = 0;
FMTCHECK;
for (start[0] = 0; start[0] < NUM_VALS; start[0]++)
if ((stat=nc_put_vara_text(ncid, varid, start, count, data[start[0]]))!=NC_NOERR) ERR2;
/* We're done! */
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
if (ndims != 2 && nvars != 1 && natts != 0 && unlimdimid != 0) ERR;
if (nc_get_var_text(ncid, varid, (char *)data_in)) ERR;
for (i = 0; i < NUM_VALS; i++)
if (strncmp(data[i], data_in[i], STR_LEN)) ERR;
if (nc_close(ncid)) ERR;
return 0;
}
/* Test a small file with a fixed dimension. */
static int
test_small_fixed(const char *testfile)
{
int ncid, dimids[NDIMS], varid;
char data[NUM_VALS][STR_LEN + 1], data_in[NUM_VALS][STR_LEN];
int ndims, nvars, natts, unlimdimid;
size_t i, start[NDIMS], count[NDIMS];
/* Create null-terminated text strings of correct length. */
/*for (i = 0; i < NUM_VALS; i++)
strcpy(data[i], source);*/
strcpy(data[0], "2005-04-11_12:00:00");
strcpy(data[1], "2005-04-11_13:00:00");
/* Create a file with two dimensions, one unlimited, and one
* var, and a global att. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NUM_VALS, dimids)) ERR;
if (nc_def_dim(ncid, DIM2_NAME, STR_LEN, &dimids[1])) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, NDIMS, dimids, &varid)) ERR;
if (nc_put_att_text(ncid, NC_GLOBAL, ATT_NAME2, strlen(TITLE), TITLE)) ERR;
if (nc_enddef(ncid)) ERR;
/* Write some records of var data. */
count[0] = 1;
count[1] = STR_LEN;
start[1] = 0;
for (start[0] = 0; start[0] < NUM_VALS; start[0]++)
if (nc_put_vara_text(ncid, varid, start, count, data[start[0]])) ERR;
/* We're done! */
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
if (ndims != 2 && nvars != 1 && natts != 0 && unlimdimid != -1) ERR;
if (nc_get_var_text(ncid, varid, (char *)data_in)) ERR;
for (i = 0; i < NUM_VALS; i++)
if (strncmp(data[i], data_in[i], STR_LEN)) ERR;
if (nc_close(ncid)) ERR;
return 0;
}
/* Test a small file with one var. */
static int
test_small_one(const char *testfile)
{
int ncid, dimid, varid;
char data = 'h', data_in;
int ndims, nvars, natts, unlimdimid;
size_t start[NDIMS], count[NDIMS];
/* Create a file with one ulimited dimensions, and one var. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, &dimid)) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 1, &dimid, &varid)) ERR;
if (nc_enddef(ncid)) ERR;
/* Write one record of var data, a single character. */
count[0] = 1;
start[0] = 0;
FMTCHECK;
if (nc_put_vara_text(ncid, varid, start, count, &data)) ERR;
/* We're done! */
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
if (ndims != 1 && nvars != 1 && natts != 0 && unlimdimid != 0) ERR;
if (nc_get_var_text(ncid, varid, &data_in)) ERR;
if (data_in != data) ERR;
if (nc_close(ncid)) ERR;
return 0;
}
#define ONE_DIM 1
#define MAX_RECS 10
/* Test a small file with one record var, which grows. */
static int
test_one_growing(const char *testfile)
{
int ncid, dimid, varid;
char data[MAX_RECS], data_in;
size_t start[ONE_DIM], count[ONE_DIM], index[ONE_DIM], len_in;
int r, f;
/* Create some phoney data. */
for (data[0] = 'a', r = 1; r < MAX_RECS; r++)
data[r] = data[r - 1] + 1;
/* Run this with and without fill mode. */
for (f = 0; f < 2; f++)
{
/* Create a file with one ulimited dimensions, and one var. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, &dimid)) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 1, &dimid, &varid)) ERR;
if (nc_close(ncid)) ERR;
/* Normally one would not close and reopen the file for each
* record, but I am giving the library a little work-out here... */
for (r = 0; r < MAX_RECS; r++)
{
/* Write one record of var data, a single character. */
if (file_open(testfile, NC_WRITE, &ncid)) ERR;
if (f) {
int format;
nc_inq_format_extended(ncid,&format,NULL);
if (format == NC_FORMATX_PNETCDF) {
/* in PnetCDF, nc_set_fill() can only be called in define mode */
if (nc_redef(ncid)) ERR;
if (nc_set_fill(ncid, NC_NOFILL, NULL)) ERR;
if (nc_enddef(ncid)) ERR;
}
else { /* test_netcdf4 */
if (nc_set_fill(ncid, NC_NOFILL, NULL)) ERR;
}
}
count[0] = 1;
start[0] = r;
FMTCHECK;
if (nc_put_vara_text(ncid, varid, start, count, &data[r])) ERR;
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq_dimlen(ncid, 0, &len_in)) ERR;
if (len_in != r + 1) ERR;
index[0] = r;
if (nc_get_var1_text(ncid, 0, index, &data_in)) ERR;
if (data_in != data[r]) ERR;
if (nc_close(ncid)) ERR;
} /* Next record. */
}
return 0;
}
#define ONE_DIM 1
#define MAX_RECS 10
/* Test a small file with one record var, which grows, and has
* attributes. */
static int
test_one_growing_with_att(const char *testfile)
{
int ncid, dimid, varid;
char data[MAX_RECS], data_in;
char att_name[NC_MAX_NAME + 1];
size_t start[ONE_DIM], count[ONE_DIM], index[ONE_DIM], len_in;
int r;
/* Create a file with one ulimited dimensions, and one var. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, &dimid)) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 1, &dimid, &varid)) ERR;
if (nc_close(ncid)) ERR;
/* Create some phoney data. */
for (data[0] = 'a', r = 1; r < MAX_RECS; r++)
data[r] = data[r - 1] + 1;
/* Normally one would not close and reopen the file for each
* record, nor add an attribute each time I add a record, but I am
* giving the library a little work-out here... */
for (r = 0; r < MAX_RECS; r++)
{
/* Write one record of var data, a single character. */
if (file_open(testfile, NC_WRITE, &ncid)) ERR;
count[0] = 1;
start[0] = r;
FMTCHECK;
if (nc_put_vara_text(ncid, varid, start, count, &data[r])) ERR;
sprintf(att_name, "a_%d", data[r]);
if (nc_redef(ncid)) ERR;
if (nc_put_att_text(ncid, varid, att_name, 1, &data[r])) ERR;
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq_dimlen(ncid, 0, &len_in)) ERR;
if (len_in != r + 1) ERR;
index[0] = r;
if (nc_get_var1_text(ncid, 0, index, &data_in)) ERR;
if (data_in != data[r]) ERR;
if (nc_get_att_text(ncid, varid, att_name, &data_in)) ERR;
if (data_in != data[r]) ERR;
if (nc_close(ncid)) ERR;
} /* Next record. */
return 0;
}
#define VAR_NAME2 "var2"
#define NUM_VARS 2
/* Test a small file with two record vars, which grow, and has
* attributes added. */
static int
test_two_growing_with_att(const char *testfile)
{
int ncid, dimid, varid[NUM_VARS];
char data[MAX_RECS], data_in;
char att_name[NC_MAX_NAME + 1];
size_t start[ONE_DIM], count[ONE_DIM], index[ONE_DIM], len_in;
int v, r;
/* Create a file with one ulimited dimensions, and one var. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, &dimid)) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 1, &dimid, &varid[0])) ERR;
if (nc_def_var(ncid, VAR_NAME2, NC_CHAR, 1, &dimid, &varid[1])) ERR;
if (nc_close(ncid)) ERR;
/* Create some phoney data. */
for (data[0] = 'a', r = 1; r < MAX_RECS; r++)
data[r] = data[r - 1] + 1;
/* Normally one would not close and reopen the file for each
* record, nor add an attribute each time I add a record, but I am
* giving the library a little work-out here... */
for (r = 0; r < MAX_RECS; r++)
{
/* Write one record of var data, a single character. */
if (file_open(testfile, NC_WRITE, &ncid)) ERR;
#ifdef USE_PNETCDF
{int format;
nc_inq_format_extended(ncid,&format,NULL);
if (format == NC_FORMATX_PNETCDF) {
if (nc_var_par_access(ncid, NC_GLOBAL, NC_COLLECTIVE)) ERR;
}}
#endif
count[0] = 1;
start[0] = r;
sprintf(att_name, "a_%d", data[r]);
for (v = 0; v < NUM_VARS; v++)
{
if (nc_put_vara_text(ncid, varid[v], start, count, &data[r])) ERR;
if (nc_redef(ncid)) ERR;
if (nc_put_att_text(ncid, varid[v], att_name, 1, &data[r])) ERR;
if (nc_enddef(ncid)) ERR;
}
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq_dimlen(ncid, 0, &len_in)) ERR;
if (len_in != r + 1) ERR;
index[0] = r;
for (v = 0; v < NUM_VARS; v++)
{
if (nc_get_var1_text(ncid, varid[v], index, &data_in)) ERR;
if (data_in != data[r]) ERR;
}
if (nc_close(ncid)) ERR;
} /* Next record. */
return 0;
}
/* Test a small file with one var and one att. */
static int
test_one_with_att(const char *testfile)
{
int ncid, dimid, varid;
char data = 'h', data_in;
int ndims, nvars, natts, unlimdimid;
size_t start[NDIMS], count[NDIMS];
/* Create a file with one ulimited dimensions, and one var. */
if (file_create(testfile, NC_CLOBBER, &ncid)) ERR;
if (nc_def_dim(ncid, DIM1_NAME, NC_UNLIMITED, &dimid)) ERR;
if (nc_def_var(ncid, VAR_NAME, NC_CHAR, 1, &dimid, &varid)) ERR;
if (nc_put_att_text(ncid, NC_GLOBAL, ATT_NAME, 1, &data)) ERR;
if (nc_enddef(ncid)) ERR;
/* Write one record of var data, a single character. */
count[0] = 1;
start[0] = 0;
FMTCHECK;
if (nc_put_vara_text(ncid, varid, start, count, &data)) ERR;
/* We're done! */
if (nc_close(ncid)) ERR;
/* Reopen the file and check it. */
if (file_open(testfile, NC_NOWRITE, &ncid)) ERR;
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
if (ndims != 1 && nvars != 1 && natts != 0 && unlimdimid != 0) ERR;
if (nc_get_var_text(ncid, varid, &data_in)) ERR;
if (data_in != data) ERR;
if (nc_get_att_text(ncid, NC_GLOBAL, ATT_NAME, &data_in)) ERR;
if (data_in != data) ERR;
if (nc_close(ncid)) ERR;
return 0;
}
int
main(int argc, char **argv)
{
int i;
char testfile[NC_MAX_NAME + 1];
#ifdef USE_PNETCDF
MPI_Init(&argc, &argv);
#endif
printf("\n*** Testing small files.\n");
/*nc_set_log_level(3);*/
/* Go thru formats and run all tests for each of two (for netCDF-3
* only builds), or 4 (for netCDF-4 builds) different formats. */
for (i = NUM_FORMATS; i >= 1; i--)
{
switch (i)
{
case NC_FORMAT_CLASSIC:
nc_set_default_format(NC_FORMAT_CLASSIC, NULL);
printf("Switching to netCDF classic format.\n");
strcpy(testfile, "tst_small_classic.nc");
break;
case NC_FORMAT_64BIT_OFFSET:
nc_set_default_format(NC_FORMAT_64BIT_OFFSET, NULL);
printf("Switching to 64-bit offset format.\n");
strcpy(testfile, "tst_small_64bit.nc");
break;
#ifdef ENABLE_CDF5
case NC_FORMAT_CDF5:
nc_set_default_format(NC_FORMAT_CDF5, NULL);
printf("Switching to 64-bit data format.\n");
strcpy(testfile, "tst_small_cdf5.nc");
break;
#else
case NC_FORMAT_CDF5:
continue;
#endif
#ifdef USE_NETCDF4
case NC_FORMAT_NETCDF4_CLASSIC:
nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL);
strcpy(testfile, "tst_small_netcdf4_classic.nc");
printf("Switching to netCDF-4 format (with NC_CLASSIC_MODEL).\n");
break;
case NC_FORMAT_NETCDF4: /* actually it's _CLASSIC. */
nc_set_default_format(NC_FORMAT_NETCDF4, NULL);
strcpy(testfile, "tst_small_netcdf4.nc");
printf("Switching to netCDF-4 format.\n");
break;
#else
case NC_FORMAT_NETCDF4_CLASSIC:
case NC_FORMAT_NETCDF4:
continue; /* loop i */
#endif
default:
printf("Unexpected format!\n");
return 2;
}
printf("*** testing simple small file with a global attribute...");
test_small_atts(testfile);
SUMMARIZE_ERR;
printf("*** testing simple small file with fixed dimensions...");
test_small_fixed(testfile);
SUMMARIZE_ERR;
printf("*** testing simple small file with an unlimited dimension...");
test_small_unlim(testfile);
SUMMARIZE_ERR;
printf("*** testing small file with one variable...");
test_small_one(testfile);
SUMMARIZE_ERR;
printf("*** testing small file with one variable and one att...");
test_one_with_att(testfile);
SUMMARIZE_ERR;
printf("*** testing small file with one record variable, which grows...");
test_one_growing(testfile);
SUMMARIZE_ERR;
printf("*** testing small file with one growing record "
"variable, with attributes added...");
test_one_growing_with_att(testfile);
SUMMARIZE_ERR;
printf("*** testing small file with two growing record "
"variables, with attributes added...");
test_two_growing_with_att(testfile);
SUMMARIZE_ERR;
}
#ifdef USE_PNETCDF
MPI_Finalize();
#endif
FINAL_RESULTS;
}