debugging

This commit is contained in:
Scot Breitenfeld 2020-09-28 16:23:04 +00:00
parent b5d7b3c817
commit deff6a5927
3 changed files with 12 additions and 11 deletions

View File

@ -697,7 +697,7 @@ NC_infermodel(const char* path, int* omodep, int iscreate, int useparallel, void
NClist* modeargs = nclistnew();
char* sfrag = NULL;
const char* modeval = NULL;
#if 0
#if H5_VERSION_GE(1,12,0)
hid_t fapl_id;
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto done;
@ -705,8 +705,8 @@ NC_infermodel(const char* path, int* omodep, int iscreate, int useparallel, void
htri_t accessible;
accessible = H5Fis_accessible(path, fapl_id);
printf("IS H5Fis_accessible %d \n",accessible);
if(accessible) {
printf("%s IS H5Fis_accessible %d \n",path,accessible);
if(accessible > 0) {
int rc=0;
FILE *fp;
char *cmd;
@ -730,7 +730,7 @@ NC_infermodel(const char* path, int* omodep, int iscreate, int useparallel, void
}
if (H5Pclose(fapl_id) < 0) goto done;
#endif
#endif
/* Phase 1:
1. convert special protocols to http|https
2. begin collecting fragments

View File

@ -50,7 +50,8 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
LOG((2, "%s: ncid 0x%x name %s len %d", __func__, ncid, name,
(int)len));
printf("%s: ncid 0x%x name %s len %d \n", __func__, ncid, name,
(int)len);
/* Find our global metadata structure. */
if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
return retval;
@ -59,7 +60,6 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
/* If the file is read-only, return an error. */
if (h5->no_write)
return NC_EPERM;
/* Check some stuff if strict nc3 rules are in effect. */
if (h5->cmode & NC_CLASSIC_MODEL)
{
@ -76,7 +76,6 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
if (!(h5->flags & NC_INDEF))
return NC_ENOTINDEFINE;
}
/* Make sure this is a valid netcdf name. */
if ((retval = nc4_check_name(name, norm_name)))
return retval;
@ -86,19 +85,20 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
if (h5->cmode & NC_CLASSIC_MODEL)
if(len > X_UINT_MAX) /* Backward compat */
return NC_EDIMSIZE;
printf("HDF5 77\n");
/* Make sure the name is not already in use. */
dim = (NC_DIM_INFO_T*)ncindexlookup(grp->dim,norm_name);
if(dim != NULL)
if(dim != NULL){
printf("ncindexlookup eerr HDF5 7x7\n");
return NC_ENAMEINUSE;
}
printf("HDF5 88\n");
/* If it's not in define mode, enter define mode. Do this only
* after checking all input data, so we only enter define mode if
* input is good. */
if (!(h5->flags & NC_INDEF))
if ((retval = NC4_redef(ncid)))
return retval;
/* Add a dimension to the list. The ID must come from the file
* information, since dimids are visible in more than one group. */
if ((retval = nc4_dim_list_add(grp, norm_name, len, -1, &dim)))

View File

@ -59,6 +59,7 @@ ncindexlookup(NCindex* ncindex, const char* name)
assert(ncindex->map != NULL);
if(!NC_hashmapget(ncindex->map,(void*)name,strlen(name),&index))
return NULL; /* not present */
printf("lkjdsf\n");
obj = (NC_OBJ*)nclistget(ncindex->list,(size_t)index);
#else
int i;