2003-04-01 02:02:10 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-04-01 02:02:10 +08:00
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
2017-04-18 03:32:16 +08:00
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
2021-02-17 22:52:36 +08:00
|
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
2017-04-18 03:32:16 +08:00
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
2003-04-01 02:02:10 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
1998-02-17 05:06:48 +08:00
|
|
|
/*
|
1998-07-02 05:33:35 +08:00
|
|
|
* Main driver of the Parallel HDF5 tests
|
1998-02-17 05:06:48 +08:00
|
|
|
*/
|
1998-02-14 14:22:11 +08:00
|
|
|
|
2001-04-06 01:09:42 +08:00
|
|
|
#include "testphdf5.h"
|
1998-04-13 12:35:49 +08:00
|
|
|
|
2001-05-12 06:01:08 +08:00
|
|
|
#ifndef PATH_MAX
|
2020-09-30 22:27:10 +08:00
|
|
|
#define PATH_MAX 512
|
|
|
|
#endif /* !PATH_MAX */
|
2000-12-13 07:12:57 +08:00
|
|
|
|
1998-04-13 12:35:49 +08:00
|
|
|
/* global variables */
|
2009-04-10 05:32:52 +08:00
|
|
|
int dim0;
|
|
|
|
int dim1;
|
1999-07-03 08:27:36 +08:00
|
|
|
int chunkdim0;
|
|
|
|
int chunkdim1;
|
2020-09-30 22:27:10 +08:00
|
|
|
int nerrors = 0; /* errors count */
|
|
|
|
int ndatasets = 300; /* number of datasets to create*/
|
|
|
|
int ngroups = 512; /* number of groups to create in root
|
|
|
|
* group. */
|
|
|
|
int facc_type = FACC_MPIO; /*Test file access type */
|
2006-08-09 11:16:07 +08:00
|
|
|
int dxfer_coll_type = DXFER_COLLECTIVE_IO;
|
1998-08-04 04:22:23 +08:00
|
|
|
|
1998-07-02 05:33:35 +08:00
|
|
|
/* other option flags */
|
2003-02-19 05:50:42 +08:00
|
|
|
|
2004-09-25 05:20:24 +08:00
|
|
|
/* FILENAME and filenames must have the same number of names.
|
|
|
|
* Use PARATESTFILE in general and use a separated filename only if the file
|
|
|
|
* created in one test is accessed by a different test.
|
2005-03-03 01:06:39 +08:00
|
|
|
* filenames[0] is reserved as the file name for PARATESTFILE.
|
2004-09-25 05:20:24 +08:00
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
#define NFILENAME 2
|
2004-09-25 05:20:24 +08:00
|
|
|
#define PARATESTFILE filenames[0]
|
2020-09-30 22:27:10 +08:00
|
|
|
const char *FILENAME[NFILENAME] = {"ParaTest", NULL};
|
2022-07-27 05:45:46 +08:00
|
|
|
char *filenames[NFILENAME];
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fapl; /* file access property list */
|
1999-04-27 12:12:18 +08:00
|
|
|
|
1998-04-13 12:35:49 +08:00
|
|
|
#ifdef USE_PAUSE
|
1998-03-31 01:03:46 +08:00
|
|
|
/* pause the process for a moment to allow debugger to attach if desired. */
|
2023-07-26 01:47:08 +08:00
|
|
|
/* Will pause more if greenlight file is not present but will eventually */
|
1998-03-31 01:03:46 +08:00
|
|
|
/* continue. */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
1999-12-18 02:54:52 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
void
|
|
|
|
pause_proc(void)
|
1998-03-31 01:03:46 +08:00
|
|
|
{
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
int pid;
|
|
|
|
h5_stat_t statbuf;
|
|
|
|
char greenlight[] = "go";
|
|
|
|
int maxloop = 10;
|
|
|
|
int loops = 0;
|
|
|
|
int time_int = 10;
|
1998-03-31 01:03:46 +08:00
|
|
|
|
1998-07-02 05:33:35 +08:00
|
|
|
/* mpi variables */
|
|
|
|
int mpi_size, mpi_rank;
|
2005-08-14 04:53:35 +08:00
|
|
|
int mpi_namelen;
|
1998-07-02 05:33:35 +08:00
|
|
|
char mpi_name[MPI_MAX_PROCESSOR_NAME];
|
|
|
|
|
1998-03-31 01:03:46 +08:00
|
|
|
pid = getpid();
|
1998-07-02 05:33:35 +08:00
|
|
|
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
|
|
|
|
MPI_Get_processor_name(mpi_name, &mpi_namelen);
|
1998-03-31 01:03:46 +08:00
|
|
|
|
1998-07-02 05:33:35 +08:00
|
|
|
if (MAINPROCESS)
|
2020-09-30 22:27:10 +08:00
|
|
|
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
|
|
|
|
if (!loops++) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
|
2019-08-15 23:28:40 +08:00
|
|
|
}
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
|
2023-06-29 23:19:31 +08:00
|
|
|
fflush(stdout);
|
2016-06-29 05:39:09 +08:00
|
|
|
HDsleep(time_int);
|
2019-08-15 23:28:40 +08:00
|
|
|
}
|
1999-12-18 02:54:52 +08:00
|
|
|
MPI_Barrier(MPI_COMM_WORLD);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Use the Profile feature of MPI to call the pause_proc() */
|
2020-09-30 22:27:10 +08:00
|
|
|
int
|
|
|
|
MPI_Init(int *argc, char ***argv)
|
1999-12-18 02:54:52 +08:00
|
|
|
{
|
|
|
|
int ret_code;
|
2020-09-30 22:27:10 +08:00
|
|
|
ret_code = PMPI_Init(argc, argv);
|
1999-12-18 02:54:52 +08:00
|
|
|
pause_proc();
|
|
|
|
return (ret_code);
|
1998-03-31 01:03:46 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
#endif /* USE_PAUSE */
|
1998-03-11 14:13:01 +08:00
|
|
|
|
1998-04-13 12:35:49 +08:00
|
|
|
/*
|
|
|
|
* Show command usage
|
|
|
|
*/
|
2002-06-20 00:06:55 +08:00
|
|
|
static void
|
1999-04-27 12:12:18 +08:00
|
|
|
usage(void)
|
1998-02-14 14:22:11 +08:00
|
|
|
{
|
2023-06-28 23:31:32 +08:00
|
|
|
printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
|
|
|
|
"[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
|
|
|
|
printf("\t-m<n_datasets>"
|
|
|
|
"\tset number of datasets for the multiple dataset test\n");
|
|
|
|
printf("\t-n<n_groups>"
|
|
|
|
"\tset number of groups for the multiple group test\n");
|
|
|
|
printf("\t-f <prefix>\tfilename prefix\n");
|
|
|
|
printf("\t-2\t\tuse Split-file together with MPIO\n");
|
|
|
|
printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR,
|
|
|
|
COL_FACTOR);
|
|
|
|
printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
|
|
|
|
printf("\n");
|
1998-02-14 14:22:11 +08:00
|
|
|
}
|
1998-03-11 14:13:01 +08:00
|
|
|
|
1998-04-13 12:35:49 +08:00
|
|
|
/*
|
|
|
|
* parse the command line options
|
|
|
|
*/
|
2002-08-27 21:42:40 +08:00
|
|
|
static int
|
1999-07-01 06:04:22 +08:00
|
|
|
parse_options(int argc, char **argv)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
int mpi_size, mpi_rank; /* mpi variables */
|
1999-07-01 06:04:22 +08:00
|
|
|
|
|
|
|
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
|
|
|
|
|
1999-07-03 08:27:36 +08:00
|
|
|
/* setup default chunk-size. Make sure sizes are > 0 */
|
2009-04-03 05:28:48 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
chunkdim0 = (dim0 + 9) / 10;
|
|
|
|
chunkdim1 = (dim1 + 9) / 10;
|
1999-07-03 08:27:36 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
while (--argc) {
|
|
|
|
if (**(++argv) != '-') {
|
2019-08-15 23:28:40 +08:00
|
|
|
break;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
switch (*(*argv + 1)) {
|
|
|
|
case 'm':
|
|
|
|
ndatasets = atoi((*argv + 1) + 1);
|
|
|
|
if (ndatasets < 0) {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'n':
|
|
|
|
ngroups = atoi((*argv + 1) + 1);
|
|
|
|
if (ngroups < 0) {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'f':
|
|
|
|
if (--argc < 1) {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
if (**(++argv) == '-') {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
paraprefix = *argv;
|
|
|
|
break;
|
|
|
|
case 'i': /* Collective MPI-IO access with independent IO */
|
|
|
|
dxfer_coll_type = DXFER_INDEPENDENT_IO;
|
|
|
|
break;
|
|
|
|
case '2': /* Use the split-file driver with MPIO access */
|
|
|
|
/* Can use $HDF5_METAPREFIX to define the */
|
|
|
|
/* meta-file-prefix. */
|
|
|
|
facc_type = FACC_MPIO | FACC_SPLIT;
|
|
|
|
break;
|
|
|
|
case 'd': /* dimensizes */
|
|
|
|
if (--argc < 2) {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
dim0 = atoi(*(++argv)) * mpi_size;
|
|
|
|
argc--;
|
|
|
|
dim1 = atoi(*(++argv)) * mpi_size;
|
|
|
|
/* set default chunkdim sizes too */
|
|
|
|
chunkdim0 = (dim0 + 9) / 10;
|
|
|
|
chunkdim1 = (dim1 + 9) / 10;
|
|
|
|
break;
|
|
|
|
case 'c': /* chunk dimensions */
|
|
|
|
if (--argc < 2) {
|
|
|
|
nerrors++;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
chunkdim0 = atoi(*(++argv));
|
|
|
|
argc--;
|
|
|
|
chunkdim1 = atoi(*(++argv));
|
|
|
|
break;
|
|
|
|
case 'h': /* print help message--return with nerrors set */
|
|
|
|
return (1);
|
|
|
|
default:
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Illegal option(%s)\n", *argv);
|
2019-08-15 23:28:40 +08:00
|
|
|
nerrors++;
|
2020-09-30 22:27:10 +08:00
|
|
|
return (1);
|
2019-08-15 23:28:40 +08:00
|
|
|
}
|
2019-05-03 05:18:58 +08:00
|
|
|
}
|
1999-04-27 12:12:18 +08:00
|
|
|
} /*while*/
|
|
|
|
|
1999-07-03 08:27:36 +08:00
|
|
|
/* check validity of dimension and chunk sizes */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (dim0 <= 0 || dim1 <= 0) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
|
2019-08-15 23:28:40 +08:00
|
|
|
nerrors++;
|
2020-09-30 22:27:10 +08:00
|
|
|
return (1);
|
1999-07-01 06:04:22 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
|
2019-08-15 23:28:40 +08:00
|
|
|
nerrors++;
|
2020-09-30 22:27:10 +08:00
|
|
|
return (1);
|
1999-07-03 08:27:36 +08:00
|
|
|
}
|
1999-07-01 06:04:22 +08:00
|
|
|
|
|
|
|
/* Make sure datasets can be divided into equal portions by the processes */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
|
2019-08-15 23:28:40 +08:00
|
|
|
if (MAINPROCESS)
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
|
2019-08-15 23:28:40 +08:00
|
|
|
nerrors++;
|
2020-09-30 22:27:10 +08:00
|
|
|
return (1);
|
1999-07-01 06:04:22 +08:00
|
|
|
}
|
|
|
|
|
2000-01-26 12:33:38 +08:00
|
|
|
/* compose the test filenames */
|
|
|
|
{
|
2019-08-15 23:28:40 +08:00
|
|
|
int i, n;
|
2019-05-03 05:18:58 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
n = sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; /* exclude the NULL */
|
2019-05-03 05:18:58 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < n; i++)
|
2022-05-02 04:54:41 +08:00
|
|
|
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("h5_fixname failed\n");
|
2019-08-15 23:28:40 +08:00
|
|
|
nerrors++;
|
2020-09-30 22:27:10 +08:00
|
|
|
return (1);
|
2019-08-15 23:28:40 +08:00
|
|
|
}
|
2023-09-01 12:34:57 +08:00
|
|
|
if (mpi_rank == 0) {
|
|
|
|
printf("Test filenames are:\n");
|
|
|
|
for (i = 0; i < n; i++)
|
|
|
|
printf(" %s\n", filenames[i]);
|
|
|
|
}
|
1998-02-14 14:22:11 +08:00
|
|
|
}
|
1999-04-27 12:12:18 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
return (0);
|
1998-04-13 12:35:49 +08:00
|
|
|
}
|
|
|
|
|
2001-11-02 23:21:51 +08:00
|
|
|
/*
|
|
|
|
* Create the appropriate File access property list
|
|
|
|
*/
|
|
|
|
hid_t
|
2014-03-22 07:02:24 +08:00
|
|
|
create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
|
2001-11-02 23:21:51 +08:00
|
|
|
{
|
2023-09-09 07:06:23 +08:00
|
|
|
hid_t ret_pl = H5I_INVALID_HID;
|
2020-09-30 22:27:10 +08:00
|
|
|
herr_t ret; /* generic return value */
|
|
|
|
int mpi_rank; /* mpi variables */
|
2001-11-02 23:21:51 +08:00
|
|
|
|
|
|
|
/* need the rank for error checking macros */
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
ret_pl = H5Pcreate(H5P_FILE_ACCESS);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret_pl >= 0), "H5Pcreate succeeded");
|
2001-11-02 23:21:51 +08:00
|
|
|
|
2002-06-20 00:06:55 +08:00
|
|
|
if (l_facc_type == FACC_DEFAULT)
|
2019-08-15 23:28:40 +08:00
|
|
|
return (ret_pl);
|
2001-11-02 23:21:51 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (l_facc_type == FACC_MPIO) {
|
2019-08-15 23:28:40 +08:00
|
|
|
/* set Parallel access with communicator */
|
|
|
|
ret = H5Pset_fapl_mpio(ret_pl, comm, info);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret >= 0), "H5Pset_fapl_mpio succeeded");
|
2023-09-06 02:49:37 +08:00
|
|
|
ret = H5Pset_all_coll_metadata_ops(ret_pl, true);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret >= 0), "H5Pset_all_coll_metadata_ops succeeded");
|
2023-09-06 02:49:37 +08:00
|
|
|
ret = H5Pset_coll_metadata_write(ret_pl, true);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret >= 0), "H5Pset_coll_metadata_write succeeded");
|
2020-09-30 22:27:10 +08:00
|
|
|
return (ret_pl);
|
2001-11-02 23:21:51 +08:00
|
|
|
}
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (l_facc_type == (FACC_MPIO | FACC_SPLIT)) {
|
2019-08-15 23:28:40 +08:00
|
|
|
hid_t mpio_pl;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
mpio_pl = H5Pcreate(H5P_FILE_ACCESS);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((mpio_pl >= 0), "H5Pcreate succeeded");
|
2019-08-15 23:28:40 +08:00
|
|
|
/* set Parallel access with communicator */
|
|
|
|
ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret >= 0), "H5Pset_fapl_mpio succeeded");
|
2019-08-15 23:28:40 +08:00
|
|
|
|
|
|
|
/* setup file access template */
|
2020-09-30 22:27:10 +08:00
|
|
|
ret_pl = H5Pcreate(H5P_FILE_ACCESS);
|
2023-07-25 03:44:02 +08:00
|
|
|
VRFY((ret_pl >= 0), "H5Pcreate succeeded");
|
2019-08-15 23:28:40 +08:00
|
|
|
/* set Parallel access with communicator */
|
|
|
|
ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl);
|
|
|
|
VRFY((ret >= 0), "H5Pset_fapl_split succeeded");
|
|
|
|
H5Pclose(mpio_pl);
|
2020-09-30 22:27:10 +08:00
|
|
|
return (ret_pl);
|
2001-11-02 23:21:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* unknown file access types */
|
|
|
|
return (ret_pl);
|
|
|
|
}
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
1998-04-13 12:35:49 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
int mpi_size, mpi_rank; /* mpi variables */
|
2004-04-02 07:00:13 +08:00
|
|
|
H5Ptest_param_t ndsets_params, ngroups_params;
|
|
|
|
H5Ptest_param_t collngroups_params;
|
2004-09-19 05:38:44 +08:00
|
|
|
H5Ptest_param_t io_mode_confusion_params;
|
2010-10-17 23:13:24 +08:00
|
|
|
H5Ptest_param_t rr_obj_flush_confusion_params;
|
1998-07-02 05:33:35 +08:00
|
|
|
|
2014-12-23 22:54:47 +08:00
|
|
|
#ifndef H5_HAVE_WIN32_API
|
2002-07-15 23:21:44 +08:00
|
|
|
/* Un-buffer the stdout and stderr */
|
2014-12-23 22:54:47 +08:00
|
|
|
HDsetbuf(stderr, NULL);
|
|
|
|
HDsetbuf(stdout, NULL);
|
|
|
|
#endif
|
2002-07-15 23:21:44 +08:00
|
|
|
|
1998-07-02 05:33:35 +08:00
|
|
|
MPI_Init(&argc, &argv);
|
|
|
|
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
|
|
|
|
|
2023-09-01 12:34:57 +08:00
|
|
|
mpi_rank_framework_g = mpi_rank;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
dim0 = ROW_FACTOR * mpi_size;
|
|
|
|
dim1 = COL_FACTOR * mpi_size;
|
2009-04-17 09:32:13 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("===================================\n");
|
|
|
|
printf("PHDF5 TESTS START\n");
|
|
|
|
printf("===================================\n");
|
1998-07-02 05:33:35 +08:00
|
|
|
}
|
2011-01-16 17:44:22 +08:00
|
|
|
|
|
|
|
/* Attempt to turn off atexit post processing so that in case errors
|
2020-09-30 22:27:10 +08:00
|
|
|
* happen during the test and the process is aborted, it will not get
|
2023-07-25 03:44:02 +08:00
|
|
|
* hung in the atexit post processing in which it may try to make MPI
|
2020-09-30 22:27:10 +08:00
|
|
|
* calls. By then, MPI calls may not work.
|
|
|
|
*/
|
|
|
|
if (H5dont_atexit() < 0) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Failed to turn off atexit processing. Continue.\n");
|
2011-01-16 17:44:22 +08:00
|
|
|
};
|
2003-04-18 11:04:56 +08:00
|
|
|
H5open();
|
2002-04-23 04:24:59 +08:00
|
|
|
h5_show_hostname();
|
|
|
|
|
2023-06-30 03:33:46 +08:00
|
|
|
memset(filenames, 0, sizeof(filenames));
|
2022-05-02 04:54:41 +08:00
|
|
|
for (int i = 0; i < NFILENAME; i++) {
|
2023-06-29 06:48:12 +08:00
|
|
|
if (NULL == (filenames[i] = malloc(PATH_MAX))) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("couldn't allocate filename array\n");
|
2022-05-02 04:54:41 +08:00
|
|
|
MPI_Abort(MPI_COMM_WORLD, -1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-04-02 07:00:13 +08:00
|
|
|
/* Initialize testing framework */
|
2004-08-19 14:32:47 +08:00
|
|
|
TestInit(argv[0], usage, parse_options);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
|
|
|
/* Tests are generally arranged from least to most complexity... */
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("mpiodup", test_fapl_mpio_dup, NULL, "fapl_mpio duplicate", NULL);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("split", test_split_comm_access, NULL, "dataset using split communicators", PARATESTFILE);
|
2022-07-12 23:55:34 +08:00
|
|
|
AddTest("h5oflusherror", test_oflush, NULL, "H5Oflush failure", PARATESTFILE);
|
2004-09-25 05:20:24 +08:00
|
|
|
|
2017-03-14 12:30:37 +08:00
|
|
|
#ifdef PB_OUT /* temporary: disable page buffering when parallel */
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("page_buffer", test_page_buffer_access, NULL, "page buffer usage in parallel", PARATESTFILE);
|
2017-03-14 12:30:37 +08:00
|
|
|
#endif
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("props", test_file_properties, NULL, "Coll Metadata file property settings", PARATESTFILE);
|
|
|
|
|
2021-04-17 02:47:32 +08:00
|
|
|
AddTest("delete", test_delete, NULL, "MPI-IO VFD file delete", PARATESTFILE);
|
|
|
|
|
2023-08-19 04:59:25 +08:00
|
|
|
AddTest("invlibverassert", test_invalid_libver_bounds_file_close_assert, NULL,
|
|
|
|
"Invalid libver bounds assertion failure", PARATESTFILE);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("idsetw", dataset_writeInd, NULL, "dataset independent write", PARATESTFILE);
|
|
|
|
AddTest("idsetr", dataset_readInd, NULL, "dataset independent read", PARATESTFILE);
|
|
|
|
|
|
|
|
AddTest("cdsetw", dataset_writeAll, NULL, "dataset collective write", PARATESTFILE);
|
|
|
|
AddTest("cdsetr", dataset_readAll, NULL, "dataset collective read", PARATESTFILE);
|
|
|
|
|
|
|
|
AddTest("eidsetw", extend_writeInd, NULL, "extendible dataset independent write", PARATESTFILE);
|
|
|
|
AddTest("eidsetr", extend_readInd, NULL, "extendible dataset independent read", PARATESTFILE);
|
|
|
|
AddTest("ecdsetw", extend_writeAll, NULL, "extendible dataset collective write", PARATESTFILE);
|
|
|
|
AddTest("ecdsetr", extend_readAll, NULL, "extendible dataset collective read", PARATESTFILE);
|
|
|
|
AddTest("eidsetw2", extend_writeInd2, NULL, "extendible dataset independent write #2", PARATESTFILE);
|
|
|
|
AddTest("selnone", none_selection_chunk, NULL, "chunked dataset with none-selection", PARATESTFILE);
|
|
|
|
AddTest("calloc", test_chunk_alloc, NULL, "parallel extend Chunked allocation on serial file",
|
|
|
|
PARATESTFILE);
|
2023-08-22 11:09:04 +08:00
|
|
|
AddTest("chkallocser2par", test_chunk_alloc_incr_ser_to_par, NULL,
|
|
|
|
"chunk allocation from serial to parallel file access", PARATESTFILE);
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("fltread", test_filter_read, NULL, "parallel read of dataset written serially with filters",
|
|
|
|
PARATESTFILE);
|
2004-09-25 05:20:24 +08:00
|
|
|
|
2004-10-05 04:29:31 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("cmpdsetr", compress_readAll, NULL, "compressed dataset collective read", PARATESTFILE);
|
2004-10-05 04:29:31 +08:00
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("zerodsetr", zero_dim_dset, NULL, "zero dim dset", PARATESTFILE);
|
2014-07-10 03:01:25 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
ndsets_params.name = PARATESTFILE;
|
2004-04-02 07:00:13 +08:00
|
|
|
ndsets_params.count = ndatasets;
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("ndsetw", multiple_dset_write, NULL, "multiple datasets write", &ndsets_params);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
ngroups_params.name = PARATESTFILE;
|
2004-04-02 07:00:13 +08:00
|
|
|
ngroups_params.count = ngroups;
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("ngrpw", multiple_group_write, NULL, "multiple groups write", &ngroups_params);
|
|
|
|
AddTest("ngrpr", multiple_group_read, NULL, "multiple groups read", &ngroups_params);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("compact", compact_dataset, NULL, "compact dataset test", PARATESTFILE);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
collngroups_params.name = PARATESTFILE;
|
2004-04-02 07:00:13 +08:00
|
|
|
collngroups_params.count = ngroups;
|
2019-05-04 05:08:22 +08:00
|
|
|
/* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */
|
|
|
|
AddTest("cngrpw-ingrpr", collective_group_write_independent_group_read, NULL,
|
2020-09-30 22:27:10 +08:00
|
|
|
"collective grp/dset write - independent grp/dset read", &collngroups_params);
|
2012-05-22 04:37:19 +08:00
|
|
|
#ifndef H5_HAVE_WIN32_API
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("bigdset", big_dataset, NULL, "big dataset test", PARATESTFILE);
|
2012-05-22 04:37:19 +08:00
|
|
|
#else
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
|
2012-05-22 04:37:19 +08:00
|
|
|
#endif
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("fill", dataset_fillvalue, NULL, "dataset fill value", PARATESTFILE);
|
|
|
|
|
|
|
|
AddTest("cchunk1", coll_chunk1, NULL, "simple collective chunk io", PARATESTFILE);
|
|
|
|
AddTest("cchunk2", coll_chunk2, NULL, "noncontiguous collective chunk io", PARATESTFILE);
|
|
|
|
AddTest("cchunk3", coll_chunk3, NULL, "multi-chunk collective chunk io", PARATESTFILE);
|
|
|
|
AddTest("cchunk4", coll_chunk4, NULL, "collective chunk io with partial non-selection ", PARATESTFILE);
|
|
|
|
|
|
|
|
if ((mpi_size < 3) && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Collective chunk IO optimization APIs ");
|
|
|
|
printf("needs at least 3 processes to participate\n");
|
|
|
|
printf("Collective chunk IO API tests will be skipped \n");
|
2006-03-29 22:35:26 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest((mpi_size < 3) ? "-cchunk5" : "cchunk5", coll_chunk5, NULL,
|
|
|
|
"linked chunk collective IO without optimization", PARATESTFILE);
|
|
|
|
AddTest((mpi_size < 3) ? "-cchunk6" : "cchunk6", coll_chunk6, NULL,
|
|
|
|
"multi-chunk collective IO with direct request", PARATESTFILE);
|
|
|
|
AddTest((mpi_size < 3) ? "-cchunk7" : "cchunk7", coll_chunk7, NULL,
|
|
|
|
"linked chunk collective IO with optimization", PARATESTFILE);
|
|
|
|
AddTest((mpi_size < 3) ? "-cchunk8" : "cchunk8", coll_chunk8, NULL,
|
|
|
|
"linked chunk collective IO transferring to multi-chunk", PARATESTFILE);
|
|
|
|
AddTest((mpi_size < 3) ? "-cchunk9" : "cchunk9", coll_chunk9, NULL,
|
|
|
|
"multiple chunk collective IO with optimization", PARATESTFILE);
|
|
|
|
AddTest((mpi_size < 3) ? "-cchunk10" : "cchunk10", coll_chunk10, NULL,
|
|
|
|
"multiple chunk collective IO transferring to independent IO", PARATESTFILE);
|
2006-03-29 22:35:26 +08:00
|
|
|
|
2019-08-15 23:28:40 +08:00
|
|
|
/* irregular collective IO tests*/
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("ccontw", coll_irregular_cont_write, NULL, "collective irregular contiguous write", PARATESTFILE);
|
|
|
|
AddTest("ccontr", coll_irregular_cont_read, NULL, "collective irregular contiguous read", PARATESTFILE);
|
|
|
|
AddTest("cschunkw", coll_irregular_simple_chunk_write, NULL, "collective irregular simple chunk write",
|
|
|
|
PARATESTFILE);
|
|
|
|
AddTest("cschunkr", coll_irregular_simple_chunk_read, NULL, "collective irregular simple chunk read",
|
|
|
|
PARATESTFILE);
|
|
|
|
AddTest("ccchunkw", coll_irregular_complex_chunk_write, NULL, "collective irregular complex chunk write",
|
|
|
|
PARATESTFILE);
|
|
|
|
AddTest("ccchunkr", coll_irregular_complex_chunk_read, NULL, "collective irregular complex chunk read",
|
|
|
|
PARATESTFILE);
|
|
|
|
|
|
|
|
AddTest("null", null_dataset, NULL, "null dataset test", PARATESTFILE);
|
2004-08-03 01:51:50 +08:00
|
|
|
|
2004-09-25 05:20:24 +08:00
|
|
|
io_mode_confusion_params.name = PARATESTFILE;
|
2004-09-19 05:38:44 +08:00
|
|
|
io_mode_confusion_params.count = 0; /* value not used */
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("I/Omodeconf", io_mode_confusion, NULL, "I/O mode confusion test -- hangs quickly on failure",
|
2004-09-19 05:38:44 +08:00
|
|
|
&io_mode_confusion_params);
|
2004-12-29 22:26:20 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mpi_size < 3) && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
|
|
|
|
printf("rr_obj_hdr_flush_confusion test will be skipped \n");
|
2014-01-07 01:56:45 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
if (mpi_size > 2) {
|
|
|
|
rr_obj_flush_confusion_params.name = PARATESTFILE;
|
2014-01-07 01:56:45 +08:00
|
|
|
rr_obj_flush_confusion_params.count = 0; /* value not used */
|
|
|
|
AddTest("rrobjflushconf", rr_obj_hdr_flush_confusion, NULL,
|
2020-09-30 22:27:10 +08:00
|
|
|
"round robin object header flush confusion test", &rr_obj_flush_confusion_params);
|
2014-01-07 01:56:45 +08:00
|
|
|
}
|
2010-10-17 23:13:24 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("alnbg1", chunk_align_bug_1, NULL, "Chunk allocation with alignment bug.", PARATESTFILE);
|
2016-08-09 05:56:50 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("tldsc", lower_dim_size_comp_test, NULL,
|
|
|
|
"test lower dim size comp in span tree to mpi derived type", PARATESTFILE);
|
[svn-r19092] Description:
Bring "shape same" changes from LBL branch to trunk. These changes
allow shapes that are the same, but projected into dataspaces with different
ranks to be detected correctly, and also contains code to project a dataspace
into greater/lesser number of dimensions, so the I/O can proceed in a faster
way.
These changes also contain several bug fixes and _lots_ of code
cleanups to the MPI datatype creation code.
Many other misc. code cleanup are included as well...
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-07-19 13:05:45 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("lccio", link_chunk_collective_io_test, NULL, "test mpi derived type management", PARATESTFILE);
|
[svn-r19092] Description:
Bring "shape same" changes from LBL branch to trunk. These changes
allow shapes that are the same, but projected into dataspaces with different
ranks to be detected correctly, and also contains code to project a dataspace
into greater/lesser number of dimensions, so the I/O can proceed in a faster
way.
These changes also contain several bug fixes and _lots_ of code
cleanups to the MPI datatype creation code.
Many other misc. code cleanup are included as well...
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-07-19 13:05:45 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("actualio", actual_io_mode_tests, NULL, "test actual io mode proprerty", PARATESTFILE);
|
[svn-r19092] Description:
Bring "shape same" changes from LBL branch to trunk. These changes
allow shapes that are the same, but projected into dataspaces with different
ranks to be detected correctly, and also contains code to project a dataspace
into greater/lesser number of dimensions, so the I/O can proceed in a faster
way.
These changes also contain several bug fixes and _lots_ of code
cleanups to the MPI datatype creation code.
Many other misc. code cleanup are included as well...
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-07-19 13:05:45 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("nocolcause", no_collective_cause_tests, NULL, "test cause for broken collective io",
|
2012-09-05 01:00:38 +08:00
|
|
|
PARATESTFILE);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("edpl", test_plist_ed, NULL, "encode/decode Property Lists", NULL);
|
[svn-r22807] Description:
Add encode/decode API routines for property lists: H5Pencode/H5Pdecode.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (ember) w/Intel compilers, w/parallel, C++ & FORTRAN,
in production mode
Mac OS X/32 10.7.3 (amazon) in debug mode
Mac OS X/32 10.7.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.7.3 (amazon) w/parallel, in debug mode
2012-09-25 23:47:25 +08:00
|
|
|
|
2021-02-17 20:37:23 +08:00
|
|
|
AddTest("extlink", external_links, NULL, "test external links", NULL);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mpi_size < 2) && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("File Image Ops daisy chain test needs at least 2 processes.\n");
|
|
|
|
printf("File Image Ops daisy chain test will be skipped \n");
|
2012-03-31 16:49:35 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest((mpi_size < 2) ? "-fiodc" : "fiodc", file_image_daisy_chain_test, NULL,
|
2012-03-31 16:49:35 +08:00
|
|
|
"file image ops daisy chain", NULL);
|
|
|
|
|
2023-08-24 23:54:13 +08:00
|
|
|
/* Atomicity operations are not supported for OpenMPI versions < major
|
|
|
|
* version 5 and will sporadically fail.
|
|
|
|
*/
|
|
|
|
#if defined(OPEN_MPI) && defined(OMPI_MAJOR_VERSION) && (OMPI_MAJOR_VERSION < 5)
|
|
|
|
if (MAINPROCESS)
|
|
|
|
printf("OpenMPI major version is < 5. Atomicity tests will be skipped due to support for atomicity "
|
|
|
|
"operations not being implemented.\n");
|
|
|
|
#else
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mpi_size < 2) && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Atomicity tests need at least 2 processes to participate\n");
|
|
|
|
printf("8 is more recommended.. Atomicity tests will be skipped \n");
|
2012-03-22 05:00:48 +08:00
|
|
|
}
|
|
|
|
else if (facc_type != FACC_MPIO && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("Atomicity tests will not work with a non MPIO VFD\n");
|
2012-03-22 05:00:48 +08:00
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
else if (mpi_size >= 2 && facc_type == FACC_MPIO) {
|
|
|
|
AddTest("atomicity", dataset_atomicity, NULL, "dataset atomic updates", PARATESTFILE);
|
2012-03-22 05:00:48 +08:00
|
|
|
}
|
2023-08-24 23:54:13 +08:00
|
|
|
#endif
|
2012-03-22 05:00:48 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
AddTest("denseattr", test_dense_attr, NULL, "Store Dense Attributes", PARATESTFILE);
|
2013-04-03 10:50:50 +08:00
|
|
|
|
2018-08-26 11:54:30 +08:00
|
|
|
AddTest("noselcollmdread", test_partial_no_selection_coll_md_read, NULL,
|
|
|
|
"Collective Metadata read with some ranks having no selection", PARATESTFILE);
|
2019-05-03 05:18:58 +08:00
|
|
|
AddTest("MC_coll_MD_read", test_multi_chunk_io_addrmap_issue, NULL,
|
2019-01-26 05:32:51 +08:00
|
|
|
"Collective MD read with multi chunk I/O (H5D__chunk_addrmap)", PARATESTFILE);
|
2019-05-03 05:18:58 +08:00
|
|
|
AddTest("LC_coll_MD_read", test_link_chunk_io_sort_chunk_issue, NULL,
|
2019-01-26 05:32:51 +08:00
|
|
|
"Collective MD read with link chunk I/O (H5D__sort_chunk)", PARATESTFILE);
|
2023-02-20 22:49:34 +08:00
|
|
|
AddTest("GH_coll_MD_wr", test_collective_global_heap_write, NULL,
|
|
|
|
"Collective MD write of global heap data", PARATESTFILE);
|
2016-02-11 01:55:55 +08:00
|
|
|
|
2012-08-10 02:09:56 +08:00
|
|
|
/* Display testing information */
|
|
|
|
TestInfo(argv[0]);
|
|
|
|
|
|
|
|
/* setup file access property list */
|
2020-09-30 22:27:10 +08:00
|
|
|
fapl = H5Pcreate(H5P_FILE_ACCESS);
|
2012-08-10 02:09:56 +08:00
|
|
|
H5Pset_fapl_mpio(fapl, MPI_COMM_WORLD, MPI_INFO_NULL);
|
|
|
|
|
|
|
|
/* Parse command line arguments */
|
|
|
|
TestParseCmdLine(argc, argv);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) {
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("===================================\n"
|
|
|
|
" Using Independent I/O with file set view to replace collective I/O \n"
|
|
|
|
"===================================\n");
|
2006-08-09 11:16:07 +08:00
|
|
|
}
|
|
|
|
|
2004-04-02 07:00:13 +08:00
|
|
|
/* Perform requested testing */
|
|
|
|
PerformTests();
|
|
|
|
|
2004-08-24 08:08:29 +08:00
|
|
|
/* make sure all processes are finished before final report, cleanup
|
2020-09-30 22:27:10 +08:00
|
|
|
* and exit.
|
|
|
|
*/
|
2004-08-24 08:08:29 +08:00
|
|
|
MPI_Barrier(MPI_COMM_WORLD);
|
|
|
|
|
2004-04-02 07:00:13 +08:00
|
|
|
/* Display test summary, if requested */
|
2004-08-24 08:08:29 +08:00
|
|
|
if (MAINPROCESS && GetTestSummary())
|
2004-04-02 07:00:13 +08:00
|
|
|
TestSummary();
|
|
|
|
|
2006-01-06 22:52:25 +08:00
|
|
|
/* Clean up test files */
|
2015-09-14 11:58:59 +08:00
|
|
|
h5_clean_files(FILENAME, fapl);
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2004-07-14 02:42:47 +08:00
|
|
|
nerrors += GetTestNumErrs();
|
2004-04-02 07:00:13 +08:00
|
|
|
|
2004-07-14 02:42:47 +08:00
|
|
|
/* Gather errors from all processes */
|
|
|
|
{
|
|
|
|
int temp;
|
2004-08-24 08:08:29 +08:00
|
|
|
MPI_Allreduce(&nerrors, &temp, 1, MPI_INT, MPI_MAX, MPI_COMM_WORLD);
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors = temp;
|
2004-07-14 02:42:47 +08:00
|
|
|
}
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (MAINPROCESS) { /* only process 0 reports */
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("===================================\n");
|
2019-08-15 23:28:40 +08:00
|
|
|
if (nerrors)
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("***PHDF5 tests detected %d errors***\n", nerrors);
|
2019-08-15 23:28:40 +08:00
|
|
|
else
|
2023-06-28 23:31:32 +08:00
|
|
|
printf("PHDF5 tests finished with no errors\n");
|
|
|
|
printf("===================================\n");
|
1998-03-31 01:03:46 +08:00
|
|
|
}
|
2016-07-19 06:36:44 +08:00
|
|
|
|
2022-05-02 04:54:41 +08:00
|
|
|
for (int i = 0; i < NFILENAME; i++) {
|
2023-06-29 06:48:12 +08:00
|
|
|
free(filenames[i]);
|
2022-05-02 04:54:41 +08:00
|
|
|
filenames[i] = NULL;
|
|
|
|
}
|
|
|
|
|
2003-02-18 13:12:58 +08:00
|
|
|
/* close HDF5 library */
|
|
|
|
H5close();
|
2003-04-18 11:04:56 +08:00
|
|
|
|
2016-07-19 06:36:44 +08:00
|
|
|
/* Release test infrastructure */
|
|
|
|
TestShutdown();
|
|
|
|
|
2003-02-18 13:12:58 +08:00
|
|
|
/* MPI_Finalize must be called AFTER H5close which may use MPI calls */
|
|
|
|
MPI_Finalize();
|
2004-08-20 13:03:28 +08:00
|
|
|
|
|
|
|
/* cannot just return (nerrors) because exit code is limited to 1byte */
|
2020-09-30 22:27:10 +08:00
|
|
|
return (nerrors != 0);
|
1998-02-14 14:22:11 +08:00
|
|
|
}
|