Hi, everyone :
I compiled meep-0.20.3 with mpich in ubuntu and found the function call
*void h5file::write(const char *dataname, const char *data)*
in
*file->write("stringtest", "Hello, world!\n"); [EMAIL PROTECTED]:103
causes
*file->close_id();*
to fail in
*delete file;*
with the outputs being
HDF5-DIAG: Error detected in HDF5 library version: 1.6.6 MPI-process 1.
Back trace follows.
#000: ../../../src/H5F.c line 2572 in H5Fclose(): decrementing file ID
failed
major(07): Atom layer
minor(18): Unable to close file
#001: ../../../src/H5F.c line 2370 in H5F_close(): can't close file
major(04): File interface
minor(18): Unable to close file
#002: ../../../src/H5F.c line 2518 in H5F_try_close(): unable to flush
cache
major(08): Meta data cache layer
minor(38): Unable to flush data from cache
......
==================================================
Check the codes in h5file.cpp
--------------------------------------------------------------------------------------
void h5file::write(const char *dataname, const char *data)
{
#ifdef HAVE_HDF5
*if (am_master()) { // only master process writes string data*
hid_t file_id = HID(get_id()), type_id, data_id, space_id;
CHECK(file_id >= 0, "error opening HDF5 output file");
remove_data(dataname); // HDF5 gives error if we H5Dcreate existing
dataset
type_id = H5Tcopy(H5T_C_S1);;
H5Tset_size(type_id, strlen(data) + 1);
space_id = H5Screate(H5S_SCALAR);
data_id = H5Dcreate(file_id, dataname, type_id, space_id, H5P_DEFAULT);
*if (am_master())*
H5Dwrite(data_id, type_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
H5Sclose(space_id);
H5Tclose(type_id);
H5Dclose(data_id);
}
#else
abort("not compiled with HDF5, required for HDF5 output");
#endif
}
-----------------------------------------------------------------------------------------------
It is clear that calling *am_master* twice makes no sense at all,
and "make check" succeeds if I delete the *if(am_master())* clauses.
It seems that HDF5 can handle the string-writing stuffs by itself. In the
PHDF5 Tutorial, I also get no reason why we should check
*am_master()*.
My hdf5 configurations in ubuntu is:
$ dpkg -l | grep hdf5
ii hdf5-tools
1.6.6-4ubuntu1 Hierarchical Data Format 5 (HDF5)
- Runtime
ii libhdf5-doc
1.6.6-4ubuntu1 Hierarchical Data Format 5 (HDF5)
- Document
ii libhdf5-mpich-1.6.6-0
1.6.6-4ubuntu1 Hierarchical Data Format 5 (HDF5)
- runtime
ii libhdf5-mpich-dev
1.6.6-4ubuntu1 Hierarchical Data Format 5 (HDF5)
- developm
Yours
Zheng Li
2008-11-4
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss