Bug#861736:
activating the NXError reporting we got
filenamenxs.h5 5 <cparam 'P' (0xb7480128)>
ERROR: cannot open file: filenamenxs.h5
0
and looking for this errormessage,
we found it in the napi5.c file
NXstatus NX5open(CONSTCHAR *filename, NXaccess am,
NXhandle* pHandle)
{
hid_t attr1,aid1, aid2, iVID;
pNexusFile5 pNew = NULL;
char pBuffer[512];
char *time_buffer = NULL;
char version_nr[10];
unsigned int vers_major, vers_minor, vers_release, am1 ;
hid_t fapl = -1;
int mdc_nelmts;
size_t rdcc_nelmts;
size_t rdcc_nbytes;
double rdcc_w0;
unsigned hdf5_majnum, hdf5_minnum, hdf5_relnum;
*pHandle = NULL;
if (H5get_libversion(&hdf5_majnum, &hdf5_minnum, &hdf5_relnum) < 0)
{
NXReportError("ERROR: cannot determine HDF5 library version");
return NX_ERROR;
}
if (hdf5_majnum == 1 && hdf5_minnum < 8)
{
NXReportError("ERROR: HDF5 library 1.8.0 or higher required");
return NX_ERROR;
}
/* mask of any options for now */
am = (NXaccess)(am & NXACCMASK_REMOVEFLAGS);
/* turn off the automatic HDF error handling */
H5Eset_auto(H5E_DEFAULT, NULL, NULL);
#ifdef USE_FTIME
struct timeb timeb_struct;
#endif
pNew = (pNexusFile5) malloc (sizeof (NexusFile5));
if (!pNew) {
NXReportError("ERROR: not enough memory to create file structure");
return NX_ERROR;
}
memset (pNew, 0, sizeof (NexusFile5));
/* start HDF5 interface */
if (am == NXACC_CREATE5) {
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pget_cache(fapl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
rdcc_nbytes=(size_t)nx_cacheSize;
H5Pset_cache(fapl,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
H5Pset_fclose_degree(fapl,H5F_CLOSE_STRONG);
am1 = H5F_ACC_TRUNC;
pNew->iFID = H5Fcreate (filename, am1, H5P_DEFAULT, fapl);
} else {
if (am == NXACC_READ) {
am1 = H5F_ACC_RDONLY;
} else {
am1 = H5F_ACC_RDWR;
}
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fclose_degree(fapl,H5F_CLOSE_STRONG);
pNew->iFID = H5Fopen (filename, am1, fapl);
}
if(fapl != -1) {
H5Pclose(fapl);
}
if (pNew->iFID <= 0) {
sprintf (pBuffer, "ERROR: cannot open file: %s", filename);
NXReportError( pBuffer);
free (pNew);
return NX_ERROR;
}
Reply to: