[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #PXF-543549]: On nf90_put_var



Sidd,

> > Nobody around here could answer me definitively so I am asking directly
> > to you.
> > Is it legal to set one of the dimension of 'count' argument be to 0 in
> > nf90_put_var ?
> > This could possibly the case in case of parallel write when some tasks
> > do not have anything to write at a particular instance.
> 
> I just added a test for this to the test program nf_test/f90tst_fill2, and
> it worked fine, not writing anything and returning with no error.  But that
> wasn't a parallel program, so the situation may be different (though I don't
> think it should be different) when invoking a parallel write.
> 
> However, I'm having trouble building and running a parallel test that does
> the same thing, so I can't answer the question yet, unfortunately ...

I just got the test working, and it completed successfully, so having a zero
component in count with a parallel write using nc_put_var_int() seems to work 
OK.
This was with in the test code in nc_test4/tst_parallel.c, in which I inserted
the following call in a loop after line 136:

       /* See if count dimension == 0 returns error */
       count_save = count[0];
       count[0] = 0;
       if (nc_put_vara_int(ncid, v1id, start, count, slab_data)) ERR;
       count[0] = count_save ;

I used netCDF-4 parallel I/O rather than netCDF-3 parallel-netCDF, in case that
makes any difference ...

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: PXF-543549
Department: Support netCDF
Priority: Normal
Status: Closed