This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Sidd, > It did help a lot. I appreciate you getting to the bottom of it by > writing code and testing it. > We will test all the platforms that we care about and take actions > accordingly. I wonder if you would mind if I forward to you what may be a closely related bug from Thomas Jahns, a developer at the Deutsches Klimarechenzentrum in Hamburg. He has a small demonstration of the problem that I have used to reproduce what he reports as a hanging process, and it appears that his calls are correct. I confused his question with yours and sent him a similar answer, but now it appears that my determining that count=0 was designed to work and did work in a simple parallel test didn't answer his question, which was more specific. I'll forward his question and the small test program in the next email. --Russ > On 8/28/2012 4:09 PM, Unidata netCDF Support wrote: > > 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 > > > > 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