Hi, Wei-keng!
That’s just the tip I needed: nf90_inq_libvers gives a string with the info
to know how to set the file mode
Thanks!!!
— Ted
On Thu, Jan 31, 2019 at 7:53 PM Wei-keng Liao <wkliao@xxxxxxxxxxxxxxxxxxxxx>
wrote:
> Hi Ted
>
> The parallel I/O of NetCDF 4.6.0 has been revised quite a lot. Constants
> NC_MPIIO, NC_PNETCDF, and NC_MPIPOSIX are deprecated in 4.6.0.
> Because parallel I/O in NetCDF must be done by calling nc_create_par
> or nc_open_par, these 3 constants become redundant.
>
> When calling nc_create_par, the format of file to be created is determined
> by flags NC_NETCDF4, NC_CLASSIC_MODEL, NC_64BIT_OFFSET, and NC_64BIT_DATA .
> The former two are for HDF5-based files and latter two are classic-based.
>
> For nc_open_par, NetCDF checks the file signature which decides either
> to call the HDF5 driver or PnetCDF drivers underneath to carry out the
> parallel I/O.
>
> I guess the next release of NetCDF-Fortran will be updated to reflect
> the above changes in C.
>
> FYI.
> command-line "nc-config --version” and "nf-config --version” print the
> library version number. So are APIs nf90_inq_libvers and nf_inq_libvers.
>
> Wei-keng
>
> > On Jan 31, 2019, at 6:27 PM, Ted Mansell <ted.mansell@xxxxxxxx> wrote:
> >
> > Hi,
> >
> > I have been using older versions of netcdf for a long time (4.3.1.1) and
> just recently tried out 4.6.0. I sometimes use pnetcdf for writing, in
> which case I used the convenient netcdf-4 interface to define the files
> like so:
> >
> > cmode = ior(ior(NF90_PNETCDF,NF90_MPIIO),nf90_64bit_offset)
> > status = nf90_create(filename(ibeg:iend), cmode, ncid, comm =
> my_comm, info = my_info)
> >
> > With 4.6.0, the NF90_PNETCDF causes an error, but it works if I remove
> that flag:
> > cmode = ior(NF90_MPIIO,nf90_64bit_offset)
> >
> > But that doesn't work with the older netcdf. Is there a way to check
> which version of netcdf I'm compiling against so that I can adapt the mode
> appropriately? I've been testing out ideas with the f90tst_parallel.f90,
> but can't seem to get both versions to work with the same code. I'm too
> lazy to write a separate code to create and define my file with pure
> pnetcdf....
> >
> > Thanks for any hints.
> >
> > -- Ted
> >
> > __________________________________________________________
> > | Edward Mansell <ted.mansell@xxxxxxxx>
> > | National Severe Storms Laboratory
> > |--------------------------------------------------------------
> > | "The contents of this message are mine personally and
> > | do not reflect any position of the U.S. Government or NOAA."
> > |--------------------------------------------------------------
> >
> > _______________________________________________
> > NOTE: All exchanges posted to Unidata maintained email lists are
> > recorded in the Unidata inquiry tracking system and made publicly
> > available through the web. Users who post to any of the lists we
> > maintain are reminded to remove any personal information that they
> > do not want to be made public.
> >
> >
> > netcdfgroup mailing list
> > netcdfgroup@xxxxxxxxxxxxxxxx
> > For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
>