Skip to content

Commit

Permalink
ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Oct 8, 2024
1 parent 396469c commit 16b0cb2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2331,6 +2331,8 @@ AM_CONDITIONAL([AX_ENABLE], [test xyes = xyes])
# Provide conditional to identify tests that must be run manually
AM_CONDITIONAL([AX_MANUAL], [test xno = xyes])

AM_CONDITIONAL([ENABLE_V3], [test xno = xyes])

AC_MSG_NOTICE([generating header files and makefiles])
AC_CONFIG_FILES(test_common.sh:test_common.in)
AC_CONFIG_FILES(s3cleanup.sh:s3cleanup.in, [chmod ugo+x s3cleanup.sh])
Expand Down
4 changes: 4 additions & 0 deletions libnczarr/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ zfilter.h \
znc4.h \
zdebug.h

if ENABLE_V3
libnczarr_la_SOURCES += zformat3.c
endif

if NETCDF_ENABLE_NCZARR_ZIP
libnczarr_la_SOURCES += zmap_zip.c
endif
Expand Down
4 changes: 0 additions & 4 deletions libnczarr/zfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1693,12 +1693,10 @@ NCZ_filters_decode(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, const NClist* jfilt
if((stat = NCZF_codec2hdf(file,var,filter))) goto done;
filter->flags |= FLAG_VISIBLE;
filter->codec = codec; codec = codec_empty;
filter->flags |= FLAG_CODEC;
} else {
/* Create a fake filter so we do not forget about this codec */
filter->hdf5 = hdf5_empty;
filter->codec = codec; codec = codec_empty;
filter->flags |= (FLAG_INCOMPLETE|FLAG_CODEC);
}
#endif
Expand Down Expand Up @@ -1781,12 +1779,10 @@ NCZ_filter_decode(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, const NCjson* jfilte
if((stat = NCZF_codec2hdf(file,var,filter))) goto done;
filter->flags |= FLAG_VISIBLE;
filter->codec = codec; codec = codec_empty;
filter->flags |= FLAG_CODEC;
} else {
/* Create a fake filter so we do not forget about this codec */
filter->hdf5 = hdf5_empty;
filter->codec = codec; codec = codec_empty;
filter->flags |= (FLAG_INCOMPLETE|FLAG_CODEC);
}
#endif

Expand Down
6 changes: 5 additions & 1 deletion libnczarr/zformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ NCZF_initialize(void)
{
int stat = NC_NOERR;
if((stat=NCZF2_initialize())) goto done;
#ifdef ENABLE_V3
if((stat=NCZF3_initialize())) goto done;
#endif
done:
return THROW(stat);
}
Expand All @@ -37,7 +39,9 @@ NCZF_finalize(void)
{
int stat = NC_NOERR;
if((stat=NCZF2_finalize())) goto done;
#ifdef ENABLE_V3
if((stat=NCZF3_finalize())) goto done;
#endif
done:
return THROW(stat);
}
Expand Down Expand Up @@ -83,7 +87,7 @@ NCZF_close(NC_FILE_INFO_T* file)

/*Read JSON Metadata*/
int
NCZF_download_grp_json(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, struct ZOBJ* zobj)
NCZF_download_grp(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, struct ZOBJ* zobj)
{
int stat = NC_NOERR;
NCZ_FILE_INFO_T* zfile = NULL;
Expand Down
7 changes: 1 addition & 6 deletions libnczarr/zformat2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,11 +1119,8 @@ static int
ZF2_decode_filter(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, NCjson* jfilter, NCZ_Filter* filter)
{
int stat = NC_NOERR;
size_t i;
const NCjson* jvalue = NULL;
NCZ_Plugin* plugin = NULL;
NCZ_FILE_INFO_T* zfile = (NCZ_FILE_INFO_T*)file->format_file_info;
NCZ_VAR_INFO_T* zvar = (NCZ_VAR_INFO_T*)var->format_var_info;
NCZ_Codec codec = NCZ_codec_empty;
NCZ_HDF5 hdf5 = NCZ_hdf5_empty;

Expand All @@ -1150,19 +1147,17 @@ ZF2_decode_filter(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, NCjson* jfilter, NCZ
hdf5.id = plugin->codec.codec->hdf5id;
/* Convert the codec to hdf5 form visible parameters */
if(plugin->codec.codec->NCZ_codec_to_hdf5) {
if((stat = plugin->codec.codec->NCZ_codec_to_hdf5(NCproplistv2,codec.codec,&hdf5.visible.nparams,&hdf5.visible.params)))
if((stat = plugin->codec.codec->NCZ_codec_to_hdf5(NCplistzarrv2,codec.codec,&hdf5.id,&hdf5.visible.nparams,&hdf5.visible.params)))
goto done;
}
filter->flags |= FLAG_VISIBLE;
filter->hdf5 = hdf5; hdf5 = NCZ_hdf5_empty;
filter->codec = codec; codec = NCZ_codec_empty;
filter->flags |= FLAG_CODEC;
filter->plugin = plugin; plugin = NULL;
} else {
/* Create a fake filter so we do not forget about this codec */
filter->hdf5 = NCZ_hdf5_empty;
filter->codec = codec; codec = NCZ_codec_empty;
filter->flags |= (FLAG_INCOMPLETE|FLAG_CODEC);
}

done:
Expand Down
4 changes: 4 additions & 0 deletions libnczarr/zinfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,17 @@ NCZ_get_formatter(NC_FILE_INFO_T* file, const NCZ_Formatter** formatterp)
if(nczarr_format != 0) {
switch(nczarr_format) {
case 2: formatter = NCZ_formatter2; break;
#ifdef ENABLE_V3
case 3: formatter = NCZ_formatter3; break;
#endif
default: stat = NC_ENCZARR; goto done;
}
} else { /* Decide based on zarr format plus the fact that it is pure zarr */
switch(zarr_format) {
case 2: formatter = NCZ_formatter2; break;
#ifdef ENABLE_V3
case 3: formatter = NCZ_formatter3; break;
#endif
default: stat = NC_ENCZARR; goto done;
}
}
Expand Down
4 changes: 0 additions & 4 deletions libnczarr/zsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ ncz_flush_var(NC_VAR_INFO_T* var)
* @internal pull storage structures and create corresponding nc4internal.h structures
*/

#if 0
/**
* @param file Pointer to file info struct.
Expand Down Expand Up @@ -409,7 +408,6 @@ ncz_decode_file(NC_FILE_INFO_T* file)
#endif
return ZUNTRACE(THROW(stat));
}
#endif /*0*/

static int
ncz_decode_subgrps(NC_FILE_INFO_T* file, NC_GRP_INFO_T* parent, NClist* subgrpnames)
Expand Down Expand Up @@ -796,7 +794,6 @@ ncz_get_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var)
}
#endif /*0*/

#if 0
/**
Insert an attribute into a list of attribute, including typing
Takes control of javalue.
Expand All @@ -817,7 +814,6 @@ ncz_insert_attr(NCjson* jatts, NCjson* jtypes, const char* aname, NCjson* javalu
}
return THROW(stat);
}
#endif /*0*/

/**************************************************/
#if 0
Expand Down

0 comments on commit 16b0cb2

Please sign in to comment.