problem with put_att (maximum number of attributes)

Alex Hoffmann ah519 at cam.ac.uk
Thu Feb 19 11:14:50 CST 2009


Dear Rob
Thanks a lot for your answer.
Isolating the PnetCDF output module from the code as a stand-alone would
require a substantial effort, and I do not encounter this error in  my
small test programs.  I attached the output module for reference.

The attribute section that causes trouble is between lines 369-405
(global) and 468-613 (variables).  I am aware that the attribute history
(line 400) may be problematic as every process may have a slightly
different value (for the time element taken from the fortran function
date_and_time).  Yet this is not the only issue.

If I prematurely exit at line 492, uncommenting any further attribute
definition between 468 and 489 causes a crash with the multiprocesses
conflict.

Note also that the attribute definitions between 558 and 613 only
produce no crash currently because of the print statements on lines 560
and 591, which made me think that maybe there is an optimization
problem.  What is strange is that if these are not included, the crash
occurs only when I start writing the first file (movie file,
out_type=2), AND if I leave the first block (if out_type==1)
uncommented, although this block is not even entered in that particular
case, and vice versa.  Hope this is more or less clear...

Cheers,
Lex


Robert Latham wrote:
> On Thu, Feb 19, 2009 at 10:09:37AM +0000, Alex Hoffmann wrote:
>> Hello,
>> I am getting the same error message as had already been inquired on in
>> this list, i.e.:
>>
>> NC definations on multiprocesses conflict.
>> NOTE: Definitions across all process
>>
>> and this seems to be related somehow randomly to the total number of
>> attributes (global or for each variable) that I intend to write during
>> the the definition phase (and, though I am not sure about this, to the
>> number of processes used to run my F90 parallel code).
>>
>> More precisely, if I uncomment one put_att to replace another, the
>> program still runs, if I do not comment out another one, the program
>> crashes with the above error message.
>>
>> Is there any way of identifying where this problem comes from or is
>> there a maximum amount of attributes (though I don't write an excessive
>> amount of them)?  There is no problem running it on one process(or).
> 
> Maybe you can show us with a small test program how you are
> encountering this error?  The maximum number of attributes is 4k (the
> constant NC_MAX_ATTRS).  
> 
> ==rob
> 

-- 
______________________________________________________________________

Alex HOFFMANN                     PhD Candidate
Centre for Atmospheric Science
Department of Geography           University of Cambridge
Downing Place, Cambridge CB2 3EN, UK
e-mail: ah519 at cam.ac.uk  tel: +44 (0)1223 766581
www.geog.cam.ac.uk/people/hoffmann/
______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atham_pnetcdf.F90
Type: text/x-fortran
Size: 40659 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20090219/8ac92f70/attachment-0001.bin>


More information about the parallel-netcdf mailing list