Commit caad8199 authored by gsell's avatar gsell
Browse files

examples/H5/attache_file.c:

- use macros for verbosity level and debug mask
- open file rw in second part
parent f97e3c8f
......@@ -14,6 +14,9 @@
#define FNAME "attach_file.h5"
#define ATTACHMENT "attach_file"
#define VERBOSITY H5_VERBOSE_ERROR
#define DEBUG_MSK H5_DEBUG_ALL
int
main (
......@@ -23,11 +26,13 @@ main (
MPI_Init (&argc, &argv);
H5SetErrorHandler (H5AbortErrorhandler);
H5SetVerbosityLevel (255);
H5SetVerbosityLevel (VERBOSITY);
H5SetDebugMask (DEBUG_MSK);
h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT);
H5AddAttachment (f, ATTACHMENT);
H5CloseFile (f);
f = H5OpenFile (FNAME, H5_O_RDONLY, H5_PROP_DEFAULT);
f = H5OpenFile (FNAME, H5_O_RDWR, H5_PROP_DEFAULT);
h5_ssize_t num_attachments = H5GetNumAttachments (f);
printf ("Number of attachments: %lld\n", (long long int)num_attachments);
int i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment