[parallel-netcdf] #30: Action prohibited on NC_GLOBAL varid
Federico Carotenuto
carotenuto.federico at gmail.com
Fri May 26 07:14:54 CDT 2017
Dear Wei-keng,
Thank you for your quick reply! Sorry if I'm replying via email but I can't
find an option to reply to the ticket directly.
I followed your suggestion and modified the source code in the following
way, in order to echo the value of emisa_times_varid before NCERR
write(*,*) "EMISA_TIMES_VARID =",emisa_times_varid
ncstat = nfmpi_get_vara_text_all(emisa_nc%id, emisa_times_varid, &
& (/i2offset(1), i2offset(ihourrun+1)/), (/i2offset(dlen),
i2offset(1)/), datebuf)
write(*,*) "EMISA_TIMES_VARID AFTER =",emisa_times_varid
NCERR(__LINE__)
In both cases, before and after the call to nfmpi, the value of
emisa_times_varid is 0.
As your links states that is effectively the NC_GLOBAL constant for
Fortran.
2017-05-25 18:46 GMT+02:00 parallel-netcdf <parallel-netcdf at mcs.anl.gov>:
> #30: Action prohibited on NC_GLOBAL varid
> ------------------------------------------------------------
> -----+----------
> Reporter: Federico Carotenuto <carotenuto.federico@…> |
> Owner: wkliao
> Type: defect/bug |
> Status: assigned
> Priority: major |
> Milestone:
> Component: parallel-netcdf |
> Version: 1.8.1
> Keywords: |
> ------------------------------------------------------------
> -----+----------
> Changes (by wkliao):
>
> * owner: robl => wkliao
> * status: new => assigned
>
>
> Comment:
>
> Hi,
>
> The Fortran constant NF_GLOBAL is defined in both NetCDF and PnetCDF as
> value 0.
> Its corresponding constant in C library NC_GLOBAL is defined as value -1.
> The variable ID returned from the Fortran nfmpi_def_var API should have a
> value larger than 0.
> You might want to check the value of emisa_times_varid right after the
> call to nfmpi_def_var.
> Do let me know if you got 0 for emisa_times_varid.
>
> The MATLAB may return a value that is C based.
>
> See definition of nf_global in the NetCDF Fortran header file from this
> URL[[br]]
> https://github.com/Unidata/netcdf-
> fortran/blob/master/fortran/netcdf3.inc#L96
>
> and PnetCDF Fortran header files from[[br]]
> https://trac.mcs.anl.gov/projects/parallel-
> netcdf/browser/trunk/src/libf/pnetcdf.inc.in#L161
>
> Wei-keng
>
> --
> Ticket URL: <http://trac.mcs.anl.gov/projects/parallel-netcdf/
> ticket/30#comment:1>
> parallel-netcdf <https://trac.mcs.anl.gov/projects/parallel-netcdf>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20170526/c87e9c02/attachment-0001.html>
More information about the parallel-netcdf
mailing list