diff --git a/libsrc4/nc4attr.c b/libsrc4/nc4attr.c index 4e5e288db..98d35e651 100644 --- a/libsrc4/nc4attr.c +++ b/libsrc4/nc4attr.c @@ -17,10 +17,6 @@ conditions. #include "nc4dispatch.h" #include "ncdispatch.h" -#if 0 /*def USE_PNETCDF*/ -#include -#endif - #ifdef ENABLE_FILEINFO static int nc4_get_att_special(NC_HDF5_FILE_INFO_T*, const char*, nc_type, int, void*, size_t*, int*); #endif @@ -564,19 +560,6 @@ NC4_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp h5 = NC4_DATA(nc); assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - MPI_Offset mpi_len; - int ret = ncmpi_inq_att(nc->int_ncid, varid, name, xtypep, &mpi_len); - if (ret != NC_NOERR) - return ret; - if (lenp) - *lenp = mpi_len; - } -#endif /* USE_PNETCDF */ - /* Handle netcdf-4 files. */ return nc4_get_att(ncid, nc, varid, name, xtypep, NC_UBYTE, lenp, NULL, 0, NULL); } @@ -598,12 +581,6 @@ NC4_inq_attid(int ncid, int varid, const char *name, int *attnump) h5 = NC4_DATA(nc); assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq_attid(nc->int_ncid, varid, name, attnump); -#endif /* USE_PNETCDF */ - /* Handle netcdf-4 files. */ return nc4_get_att(ncid, nc, varid, name, NULL, NC_UBYTE, NULL, attnump, 0, NULL); @@ -630,12 +607,6 @@ NC4_inq_attname(int ncid, int varid, int attnum, char *name) h5 = NC4_DATA(nc); assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq_attname(nc->int_ncid, varid, attnum, name); -#endif /* USE_PNETCDF */ - /* Handle netcdf-4 files. */ if ((retval = nc4_find_nc_att(ncid, varid, NULL, attnum, &att))) return retval; @@ -682,12 +653,6 @@ NC4_rename_att(int ncid, int varid, const char *name, if (h5->no_write) return NC_EPERM; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_rename_att(nc->int_ncid, varid, name, newname); -#endif /* USE_PNETCDF */ - /* Check and normalize the name. */ if ((retval = nc4_check_name(newname, norm_newname))) return retval; @@ -792,12 +757,6 @@ NC4_del_att(int ncid, int varid, const char *name) if (h5->no_write) return NC_EPERM; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_del_att(nc->int_ncid, varid, name); -#endif /* USE_PNETCDF */ - /* If it's not in define mode, forget it. */ if (!(h5->flags & NC_INDEF)) { @@ -905,44 +864,6 @@ nc4_put_att_tc(int ncid, int varid, const char *name, nc_type file_type, } } -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - if (mem_type == NC_UBYTE) - mem_type = NC_BYTE; - - switch(mem_type) - { - case NC_BYTE: - return ncmpi_put_att_schar(nc->int_ncid, varid, name, - file_type, len, op); - case NC_CHAR: - return ncmpi_put_att_text(nc->int_ncid, varid, name, - len, op); - case NC_SHORT: - return ncmpi_put_att_short(nc->int_ncid, varid, name, - file_type, len, op); - case NC_INT: - if (mem_type_is_long) - return ncmpi_put_att_long(nc->int_ncid, varid, name, - file_type, len, op); - else - return ncmpi_put_att_int(nc->int_ncid, varid, name, - file_type, len, op); - case NC_FLOAT: - return ncmpi_put_att_float(nc->int_ncid, varid, name, - file_type, len, op); - case NC_DOUBLE: - return ncmpi_put_att_double(nc->int_ncid, varid, name, - file_type, len, op); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } -#endif /* USE_PNETCDF */ - /* Otherwise, handle things the netcdf-4 way. */ return nc4_put_att(ncid, nc, varid, name, file_type, mem_type, len, mem_type_is_long, op); @@ -1006,37 +927,7 @@ nc4_get_att_tc(int ncid, int varid, const char *name, nc_type mem_type, h5 = NC4_DATA(nc); assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - if (mem_type == NC_UBYTE) - mem_type = NC_BYTE; - - switch(mem_type) - { - case NC_BYTE: - return ncmpi_get_att_schar(nc->int_ncid, varid, name, ip); - case NC_CHAR: - return ncmpi_get_att_text(nc->int_ncid, varid, name, ip); - case NC_SHORT: - return ncmpi_get_att_short(nc->int_ncid, varid, name, ip); - case NC_INT: - if (mem_type_is_long) - return ncmpi_get_att_long(nc->int_ncid, varid, name, ip); - else - return ncmpi_get_att_int(nc->int_ncid, varid, name, ip); - case NC_FLOAT: - return ncmpi_get_att_float(nc->int_ncid, varid, name, ip); - case NC_DOUBLE: - return ncmpi_get_att_double(nc->int_ncid, varid, name, ip); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } -#endif /* USE_PNETCDF */ - return nc4_get_att(ncid, nc, varid, name, NULL, mem_type, + return nc4_get_att(ncid, nc, varid, name, NULL, mem_type, NULL, NULL, mem_type_is_long, ip); } diff --git a/libsrc4/nc4dim.c b/libsrc4/nc4dim.c index 23e068c88..8d17c9aa5 100644 --- a/libsrc4/nc4dim.c +++ b/libsrc4/nc4dim.c @@ -14,10 +14,6 @@ $Id: nc4dim.c,v 1.41 2010/05/25 17:54:23 dmh Exp $ #include "nc4internal.h" #include "nc4dispatch.h" -#if 0 /*def USE_PNETCDF*/ -#include -#endif - /* Netcdf-4 files might have more than one unlimited dimension, but return the first one anyway. */ /* Note that this code is inconsistent with nc_inq */ @@ -37,12 +33,6 @@ NC4_inq_unlimdim(int ncid, int *unlimdimidp) return retval; assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq_unlimdim(nc->int_ncid, unlimdimidp); -#endif /* USE_PNETCDF */ - /* According to netcdf-3 manual, return -1 if there is no unlimited dimension. */ *unlimdimidp = -1; @@ -88,12 +78,6 @@ NC4_def_dim(int ncid, const char *name, size_t len, int *idp) if (h5->no_write) return NC_EPERM; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_def_dim(nc->int_ncid, name, len, idp); -#endif /* USE_PNETCDF */ - /* Check some stuff if strict nc3 rules are in effect. */ if (h5->cmode & NC_CLASSIC_MODEL) { @@ -173,12 +157,6 @@ NC4_inq_dimid(int ncid, const char *name, int *idp) assert(h5); assert(nc && grp); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq_dimid(nc->int_ncid, name, idp); -#endif /* USE_PNETCDF */ - /* Normalize name. */ if ((retval = nc4_normalize_name(name, norm_name))) return retval; @@ -219,19 +197,6 @@ NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp) assert(h5); assert(nc && grp); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - MPI_Offset mpi_len; - if ((ret = ncmpi_inq_dim(nc->int_ncid, dimid, name, &mpi_len))) - return ret; - if (lenp) - *lenp = mpi_len; - return ret; - } -#endif /* USE_PNETCDF */ - /* Find the dimension and its home group. */ if ((ret = nc4_find_dim(grp, dimid, &dim, &dim_grp))) return ret; @@ -297,12 +262,6 @@ NC4_rename_dim(int ncid, int dimid, const char *name) if (h5->no_write) return NC_EPERM; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_rename_dim(nc->int_ncid, dimid, name); -#endif /* USE_PNETCDF */ - /* Make sure this is a valid netcdf name. */ if ((retval = nc4_check_name(name, norm_name))) return retval; diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c index 4a4e70fdb..45e3c9c7d 100644 --- a/libsrc4/nc4file.c +++ b/libsrc4/nc4file.c @@ -348,11 +348,6 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info, nc4_info = NC4_DATA(nc); assert(nc4_info && nc4_info->root_grp); -#if 0 /*def USE_PNETCDF*/ - if (cmode & NC_PNETCDF) - return NC_NOERR; -#endif - /* Need this access plist to control how HDF5 handles open objects * on file close. (Setting H5F_CLOSE_SEMI will cause H5Fclose to * fail if there are any open objects in the file. */ @@ -574,18 +569,6 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe, nc_file->int_ncid = nc_file->ext_ncid; res = nc4_create_file(path, cmode, comm, info, nc_file); -#if 0 /*def USE_PNETCDF*/ - if (cmode & NC_PNETCDF) - { - NC_HDF5_FILE_INFO_T* nc4_info; - nc4_info = NC4_DATA(nc_file); - assert(nc4_info); - - nc4_info->pnetcdf_file++; - res = ncmpi_create(comm, path, cmode, info, &(nc_file->int_ncid)); - } -#endif /* USE_PNETCDF */ - return res; } @@ -2923,12 +2906,6 @@ NC4_set_fill(int ncid, int fillmode, int *old_modep) nc4_info->fill_mode = fillmode; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (nc4_info->pnetcdf_file) - return ncmpi_set_fill(nc->int_ncid, fillmode, old_modep); -#endif /* USE_PNETCDF */ - return NC_NOERR; } @@ -2947,12 +2924,6 @@ NC4_redef(int ncid) return NC_EBADID; assert(nc4_info); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (nc4_info->pnetcdf_file) - return ncmpi_redef(nc->int_ncid); -#endif /* USE_PNETCDF */ - /* If we're already in define mode, return an error. */ if (nc4_info->flags & NC_INDEF) return NC_EINDEFINE; @@ -2996,20 +2967,6 @@ static int NC4_enddef(int ncid) return NC_EBADID; assert(nc4_info); -#if 0 /*def USE_PNETCDF*/ - if (nc4_info->pnetcdf_file) - { - int res; - res = ncmpi_enddef(nc->int_ncid); - if (!res) - { - if (nc4_info->pnetcdf_access_mode == NC_INDEPENDENT) - res = ncmpi_begin_indep_data(nc->int_ncid); - } - return res; - } -#endif /* USE_PNETCDF */ - return nc4_enddef_netcdf4_file(nc4_info); } @@ -3077,12 +3034,6 @@ NC4_sync(int ncid) return NC_EBADID; assert(nc4_info); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (nc4_info->pnetcdf_file) - return ncmpi_sync(nc->int_ncid); -#endif /* USE_PNETCDF */ - /* If we're in define mode, we can't sync. */ if (nc4_info && nc4_info->flags & NC_INDEF) { @@ -3204,12 +3155,6 @@ NC4_abort(int ncid) assert(nc4_info); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (nc4_info->pnetcdf_file) - return ncmpi_abort(nc->int_ncid); -#endif /* USE_PNETCDF */ - /* If we're in define mode, but not redefing the file, delete it. */ if (nc4_info->flags & NC_INDEF && !nc4_info->redef) { @@ -3251,12 +3196,6 @@ NC4_close(int ncid) if (grp->parent) return NC_EBADGRPID; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_close(nc->int_ncid); -#endif /* USE_PNETCDF */ - /* Call the nc4 close. */ if ((retval = close_netcdf4_file(grp->nc4_info, 0))) return retval; @@ -3285,12 +3224,6 @@ NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp) assert(h5 && grp && nc); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq(nc->int_ncid, ndimsp, nvarsp, nattsp, unlimdimidp); -#endif /* USE_PNETCDF */ - /* Count the number of dims, vars, and global atts. */ if (ndimsp) { @@ -3331,36 +3264,6 @@ NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp) return NC_NOERR; } -#if 0 -int -NC4_set_content(int ncid, size_t size, void* memory) -{ - int retval = NC_NOERR; - herr_t herr; - NC *nc; - NC_HDF5_FILE_INFO_T *h5; - NC_GRP_INFO_T *grp; - - LOG((4,"%s: ncid 0x%x size %ld memory 0x%x", __func__, ncid, size, memory)); - - /* Find file metadata. */ - if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5))) - return retval; - assert(h5 && grp && nc); - -#ifdef USE_DISKLESS - herr = H5Pset_file_image(h5->hdfid,memory,size); - if(herr) - BAIL(NC_EHDFERR); -#else - retval = NC_EDISKLESS; -#endif - -done: - return retval; -} -#endif - /* This function will do the enddef stuff for a netcdf-4 file. */ int nc4_enddef_netcdf4_file(NC_HDF5_FILE_INFO_T *h5) diff --git a/libsrc4/nc4hdf.c b/libsrc4/nc4hdf.c index d11d800df..86424f0df 100644 --- a/libsrc4/nc4hdf.c +++ b/libsrc4/nc4hdf.c @@ -3978,12 +3978,6 @@ NC4_isnetcdf4(struct NC_HDF5_FILE_INFO* h5) int isnc4 = 0; int count; -#if 0 - if(h5->fileinfo->propattr.version > 0) { - isnc4 = 1; - goto done; - } -#endif /* Look for NC3_STRICT_ATT_NAME */ isnc4 = NC4_get_strict_att(h5); if(isnc4 > 0) diff --git a/libsrc4/nc4internal.c b/libsrc4/nc4internal.c index fd4c0887e..c0fcce787 100644 --- a/libsrc4/nc4internal.c +++ b/libsrc4/nc4internal.c @@ -19,10 +19,6 @@ conditions. #include "H5DSpublic.h" #include -#if 0 /*def USE_PNETCDF*/ -#include -#endif - #define MEGABYTE 1048576 /* These are the default chunk cache sizes for HDF5 files created or @@ -253,16 +249,6 @@ nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grpp, if(f == NULL) return NC_EBADID; *nc = f; -#if 0 /* I do not understand this code at all */ -#if 0 /*def USE_PNETCDF*/ - if (h5->pnetcdf_file) { - *h5p = NULL; - *grpp = NULL; - return NC_NOERR; - } -#endif -#endif - if (h5) { assert(h5->root_grp); /* If we can't find it, the grp id part of ncid is bad. */ diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index b990c4a59..9edf540fd 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -13,10 +13,6 @@ conditions. #include "nc4dispatch.h" #include -#if 0 /*def USE_PNETCDF*/ -#include -#endif - /* Min and max deflate levels tolerated by HDF5. */ #define MIN_DEFLATE_LEVEL 0 #define MAX_DEFLATE_LEVEL 9 @@ -627,19 +623,6 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, int ndims, if (!(nc = nc4_find_nc_file(ncid,&h5))) return NC_EBADID; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - int ret; - - ret = ncmpi_def_var(nc->int_ncid, name, xtype, ndims, - dimidsp, varidp); - h5->pnetcdf_ndims[*varidp] = ndims; - return ret; - } -#endif /* USE_PNETCDF */ - /* Handle netcdf-4 cases. */ return nc_def_var_nc4(ncid, name, xtype, ndims, dimidsp, varidp); } @@ -673,13 +656,6 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, assert(nc); assert(grp && h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_inq_var(nc->int_ncid, varid, name, xtypep, ndimsp, - dimidsp, nattsp); -#endif /* USE_PNETCDF */ - /* Walk through the list of vars, and return the info about the one with a matching varid. If the varid is -1, find the global atts and call it a day. */ @@ -1154,10 +1130,6 @@ NC4_inq_varid(int ncid, const char *name, int *varidp) int retval; uint32_t nn_hash; -#if 0 /*def USE_PNETCDF*/ - NC_HDF5_FILE_INFO_T *h5; -#endif - if (!name) return NC_EINVAL; if (!varidp) @@ -1169,16 +1141,6 @@ NC4_inq_varid(int ncid, const char *name, int *varidp) if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, NULL))) return retval; -#if 0 /*def USE_PNETCDF*/ - h5 = NC4_DATA(nc); - assert(h5); - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - return ncmpi_inq_varid(nc->int_ncid, name, varidp); - } -#endif /* USE_PNETCDF */ - /* Normalize name. */ if ((retval = nc4_normalize_name(name, norm_name))) return retval; @@ -1219,12 +1181,6 @@ NC4_rename_var(int ncid, int varid, const char *name) assert(h5); -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (h5->pnetcdf_file) - return ncmpi_rename_var(nc->int_ncid, varid, name); -#endif /* USE_PNETCDF */ - /* Is the new name too long? */ if (strlen(name) > NC_MAX_NAME) return NC_EMAXNAME; @@ -1332,21 +1288,6 @@ NC4_var_par_access(int ncid, int varid, int par_access) if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5))) return retval; -#if 0 /*def USE_PNETCDF*/ - /* Handle files opened/created with parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - if (par_access == h5->pnetcdf_access_mode) - return NC_NOERR; - - h5->pnetcdf_access_mode = par_access; - if (par_access == NC_INDEPENDENT) - return ncmpi_begin_indep_data(nc->int_ncid); - else - return ncmpi_end_indep_data(nc->int_ncid); - } -#endif /* USE_PNETCDF */ - /* This function only for files opened with nc_open_par or nc_create_par. */ if (!h5->parallel) return NC_ENOPAR; @@ -1372,94 +1313,12 @@ nc4_put_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long, { NC *nc; -#if 0 /*def USE_PNETCDF*/ - NC_HDF5_FILE_INFO_T *h5; -#endif - LOG((2, "%s: ncid 0x%x varid %d mem_type %d mem_type_is_long %d", __func__, ncid, varid, mem_type, mem_type_is_long)); if (!(nc = nc4_find_nc_file(ncid,NULL))) return NC_EBADID; -#if 0 /*def USE_PNETCDF*/ - h5 = NC4_DATA(nc); - assert(h5); - - /* Handle files opened/created with the parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - MPI_Offset *mpi_start; - MPI_Offset *mpi_count; - int d; - - mpi_start = (MPI_Offset*)alloca(sizeof(MPI_Offset)*h5->pnetcdf_ndims[varid]); - mpi_count = (MPI_Offset*)alloca(sizeof(MPI_Offset)*h5->pnetcdf_ndims[varid]); - - /* No NC_LONGs for parallel-netcdf library! */ - if (mem_type_is_long) - return NC_EINVAL; - - /* We must convert the start, count, and stride arrays to - * MPI_Offset type. */ - for (d = 0; d < h5->pnetcdf_ndims[varid]; d++) - { - mpi_start[d] = startp[d]; - mpi_count[d] = countp[d]; - } - - if (h5->pnetcdf_access_mode == NC_INDEPENDENT) - { - switch(mem_type) - { - case NC_BYTE: - return ncmpi_put_vara_schar(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_UBYTE: - return ncmpi_put_vara_uchar(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_CHAR: - return ncmpi_put_vara_text(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_SHORT: - return ncmpi_put_vara_short(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_INT: - return ncmpi_put_vara_int(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_FLOAT: - return ncmpi_put_vara_float(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_DOUBLE: - return ncmpi_put_vara_double(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } - else - { - switch(mem_type) - { - case NC_BYTE: - return ncmpi_put_vara_schar_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_UBYTE: - return ncmpi_put_vara_uchar_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_CHAR: - return ncmpi_put_vara_text_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_SHORT: - return ncmpi_put_vara_short_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_INT: - return ncmpi_put_vara_int_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_FLOAT: - return ncmpi_put_vara_float_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_DOUBLE: - return ncmpi_put_vara_double_all(nc->int_ncid, varid, mpi_start, mpi_count, op); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } - - return NC_EBADTYPE; - } - -#endif /* USE_PNETCDF */ - return nc4_put_vara(nc, ncid, varid, startp, countp, mem_type, mem_type_is_long, (void *)op); } @@ -1509,74 +1368,6 @@ nc4_get_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long, if (!(nc = nc4_find_nc_file(ncid,&h5))) return NC_EBADID; -#if 0 /*def USE_PNETCDF*/ - /* Handle files opened/created with the parallel-netcdf library. */ - if (h5->pnetcdf_file) - { - MPI_Offset mpi_start[NC_MAX_VAR_DIMS], mpi_count[NC_MAX_VAR_DIMS]; - int d; - - /* No NC_LONGs for parallel-netcdf library! */ - if (mem_type_is_long) - return NC_EINVAL; - - /* We must convert the start, count, and stride arrays to - * MPI_Offset type. */ - for (d = 0; d < h5->pnetcdf_ndims[varid]; d++) - { - mpi_start[d] = startp[d]; - mpi_count[d] = countp[d]; - } - - if (h5->pnetcdf_access_mode == NC_INDEPENDENT) - { - switch(mem_type) - { - case NC_BYTE: - return ncmpi_get_vara_schar(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_UBYTE: - return ncmpi_get_vara_uchar(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_CHAR: - return ncmpi_get_vara_text(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_SHORT: - return ncmpi_get_vara_short(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_INT: - return ncmpi_get_vara_int(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_FLOAT: - return ncmpi_get_vara_float(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_DOUBLE: - return ncmpi_get_vara_double(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } - else - { - switch(mem_type) - { - case NC_BYTE: - return ncmpi_get_vara_schar_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_UBYTE: - return ncmpi_get_vara_uchar_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_CHAR: - return ncmpi_get_vara_text_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_SHORT: - return ncmpi_get_vara_short_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_INT: - return ncmpi_get_vara_int_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_FLOAT: - return ncmpi_get_vara_float_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_DOUBLE: - return ncmpi_get_vara_double_all(nc->int_ncid, varid, mpi_start, mpi_count, ip); - case NC_NAT: - default: - return NC_EBADTYPE; - } - } - } -#endif /* USE_PNETCDF */ - #ifdef USE_HDF4 /* Handle HDF4 cases. */ if (h5->hdf4) diff --git a/libsrc4/ncfunc.c b/libsrc4/ncfunc.c index 8fb7fb176..a89caf9cd 100644 --- a/libsrc4/ncfunc.c +++ b/libsrc4/ncfunc.c @@ -50,12 +50,6 @@ NC4_inq_format(int ncid, int *formatp) if (!(nc = nc4_find_nc_file(ncid,&nc4_info))) return NC_EBADID; -#if 0 /*def USE_PNETCDF*/ - /* Take care of files created/opened with parallel-netcdf library. */ - if (nc4_info->pnetcdf_file) - return ncmpi_inq_format(nc->int_ncid, formatp); -#endif /* USE_PNETCDF */ - /* Otherwise, this is a netcdf-4 file. Check if classic NC3 rules * are in effect for this file. */ if (nc4_info->cmode & NC_CLASSIC_MODEL)