diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2005-12-16 08:08:54 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2005-12-16 08:08:54 (GMT) |
commit | a735b263d3c20ac4a1b66ab6070a1a539b523f84 (patch) | |
tree | 03ec0a331016bcc47100bf8f262721c29cb96012 /testpar | |
parent | 3f1ee5ee1ddee22f9b89a6b5c978a7146ec2ee80 (diff) | |
download | hdf5-a735b263d3c20ac4a1b66ab6070a1a539b523f84.zip hdf5-a735b263d3c20ac4a1b66ab6070a1a539b523f84.tar.gz hdf5-a735b263d3c20ac4a1b66ab6070a1a539b523f84.tar.bz2 |
[svn-r11798] Purpose:
Feature.
Description:
Modified it so that it can be compiled outside of HDF5 library as a standalone
program. e.g., mpicc -DSTANDALONE prog.c.
Platforms tested:
Tested in Red storm and heping.
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_posix_compliant.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testpar/t_posix_compliant.c b/testpar/t_posix_compliant.c index 5965ff7..6a54cfd 100644 --- a/testpar/t_posix_compliant.c +++ b/testpar/t_posix_compliant.c @@ -32,12 +32,25 @@ * larber@ncsa.uiuc.edu */ +/* To compile this outside of the HDF5 library, you can do so by defining the + * macro STANDALONE. E.g., + * mpicc -DSTANDALONE t_posix_compliant.c -o t_posix_compliant + * then run it as an MPI application. E.g., + * mpirun -np 3 ./t_posix_compliant + */ + #include <unistd.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <mpi.h> +#ifndef STANDALONE #include "h5test.h" +#else +#define HDmalloc(sz) malloc(sz) +#define HDfree(p) free(p) +#define getenv_all(comm, root, name) getenv(name) +#endif #define TESTFNAME "posix_test" /* test file name */ static char* testfile = NULL; @@ -753,8 +766,10 @@ int main(int argc, char* argv[]) inc = 2; } +#ifndef STANDALONE /* set alarm. */ ALARM_ON; +#endif for(write_size = lb; write_size <= ub; write_size*=inc) { @@ -823,8 +838,10 @@ int main(int argc, char* argv[]) } } +#ifndef STANDALONE /* turn off alarm */ ALARM_OFF; +#endif done: if (testfile) |