Commit db81cb3d authored by gsell's avatar gsell

attachment test moved to examples

parent 4a8eedd3
......@@ -364,6 +364,7 @@ doc/tetrahedron_refinements/6-edges/edge_01-12-20-23-30-31_refined/output_file.j
doc/tetrahedron_refinements/README -text
doc/tetrahedron_refinements/text2vtk.py -text
examples/H5/Makefile.am -text
examples/H5/attach_file.c -text
examples/H5/file_attribs.c -text
examples/H5/openclose.c -text
examples/H5Block/H5BlockExample.pbs -text
......@@ -547,7 +548,6 @@ src/include/h5core/h5t_tags.h -text
src/include/h5core/h5u_io.h -text
src/include/h5core/h5u_model.h -text
test/Makefile.am -text
test/h5_attach_test.c -text
test/h5b_read.c -text
test/h5b_test.c -text
test/h5b_write.c -text
......
......@@ -15,16 +15,17 @@ noinst_PROGRAMS =
if ENABLE_C
noinst_PROGRAMS += \
openclose \
file_attribs
file_attribs \
attach_file
endif
if ENABLE_FORTRAN
noinst_PROGRAMS +=
endif
EXTRA_PROGRAMS = openclose
#EXTRA_PROGRAMS = openclose
openclose_SOURCES = openclose.c
#openclose_SOURCES = openclose.c
%.o : %.f90
$(FC) $(FFLAGS) -c $<
#%.o : %.f90
# $(FC) $(FFLAGS) -c $<
......@@ -3,18 +3,33 @@
#include <stdlib.h>
#include <sys/stat.h>
#define FNAME "h5_attach.h5"
#define ATTACHMENT "h5_attach_test"
#define FNAME "attach_file.h5"
#define ATTACHMENT "attach_file"
#if !defined (PARALLEL_IO)
#define MPI_Init(argc, argv)
#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; }
#define MPI_Comm_rank(comm, myproc) { *myproc = 0; }
#define MPI_Finalize()
#define MPI_COMM_WORLD (0)
#endif
int
main (
int argc,
char* argv[]
) {
MPI_Comm comm = MPI_COMM_WORLD;
int myproc;
int nprocs;
MPI_Init (&argc, &argv);
MPI_Comm_size (comm, &nprocs);
MPI_Comm_rank (comm, &myproc);
H5SetErrorHandler (H5AbortErrorhandler);
H5SetVerbosityLevel (255);
h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, 0);
h5_file_t f = H5OpenFile (FNAME, H5_O_WRONLY, comm);
H5AddAttachment (f, ATTACHMENT);
H5CloseFile (f);
f = H5OpenFile (FNAME, H5_O_RDONLY, 0);
......
#include "H5hut.h"
#if !defined (PARALLEL_IO)
#define MPI_Init(argc, argv)
#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; }
#define MPI_Comm_rank(comm, myproc) { *myproc = 0; }
#define MPI_Finalize()
#define MPI_COMM_WORLD (0)
#endif
int
main (
......
......@@ -7,7 +7,7 @@ LDADD += -lH5hut
noinst_PROGRAMS =
if ENABLE_C
noinst_PROGRAMS += h5u_test h5b_test h5_attach_test
noinst_PROGRAMS += h5u_test h5b_test
endif
TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5_PREFIX@/lib:$(LD_LIBRARY_PATH)
......
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