[mpich-discuss] ROMIO: ADIOI_Calc_my_off_len (patch proposed for adio/comm/ad_read_coll.c)

Rob Ross rross at mcs.anl.gov
Wed Jul 28 09:41:26 CDT 2010


Glad we got it sorted out. Thanks. -- Rob

On Jul 28, 2010, at 4:35 AM, Pascal Deveze wrote:

> Hi Rob,
>
> I recompiled with original mpich2 and all run well. There was a  
> "little" problem in my modifications.
> Thanks for your answer.
>
> Pascal
>
> Rob Ross a écrit :
>> Hi Pascal,
>>
>> The code is purposefully skipping blocks of length zero because  
>> there is no data in them. Until we hit a block with data in it, we  
>> have not found an offset.
>>
>> Perhaps I don't understand. Can you provide an example code that  
>> would exhibit a problem with the code as it exists now?
>>
>> Thanks,
>>
>> Rob
>>
>> On Jul 27, 2010, at 7:47 AM, Pascal Deveze wrote:
>>
>>> At line 379 of adio/common/ad_read_coll.c, if flat_file- 
>>> >blocklens[i] is null, the code continue.
>>> But in the case where i is null (first loop), the first calculated  
>>> offset is false.
>>>
>>> 369          if (file_ptr_type == ADIO_INDIVIDUAL) {
>>> 370             /* Wei-keng reworked type processing to be a bit  
>>> more efficient */
>>> 371              offset       = fd->fp_ind - disp;
>>> 372              n_filetypes  = (offset - flat_file->indices[0]) /  
>>> filetype_extent;
>>> 373               offset     -= (ADIO_Offset)n_filetypes *  
>>> filetype_extent;
>>> 374                  /* now offset is local to this extent */
>>> 375
>>> 376              /* find the block where offset is located, skip  
>>> blocklens[i]==0 */
>>> 377              for (i=0; i<flat_file->count; i++) {
>>> 378                  ADIO_Offset dist;
>>> 379                  if (flat_file->blocklens[i] == 0) continue;
>>> 380                  dist = flat_file->indices[i] + flat_file- 
>>> >blocklens[i] - offset;
>>> 381                  /* frd_size is from offset to the end of  
>>> block i */
>>> 382                  if (dist == 0) {
>>> 383                          i++;
>>> 384                          offset   = flat_file->indices[i];
>>> 385                          frd_size = flat_file->blocklens[i];
>>> 386                          break;
>>> 387                  }
>>> 388                  if (dist > 0) {
>>> 389                      frd_size = dist;
>>> 390                      break;
>>> 391                  }
>>> 392              }
>>> 393              st_index = i;  /* starting index in flat_file- 
>>> >indices[] */
>>> 394              offset += disp +  
>>> (ADIO_Offset)n_filetypes*filetype_extent;
>>> 395          }
>>>
>>> I propose not to skip blocklens[i]==0
>>> diff -u ad_read_coll.c.old ad_read_coll.c
>>> --- ad_read_coll.c.old  2008-11-13 17:54:08.000000000 +0100
>>> +++ ad_read_coll.c      2010-07-27 14:45:11.000000000 +0200
>>> @@ -373,10 +373,9 @@
>>>            offset     -= (ADIO_Offset)n_filetypes * filetype_extent;
>>>              /* now offset is local to this extent */
>>> -            /* find the block where offset is located, skip  
>>> blocklens[i]==0 */
>>> +            /* find the block where offset is located */
>>>           for (i=0; i<flat_file->count; i++) {
>>>               ADIO_Offset dist;
>>> -                if (flat_file->blocklens[i] == 0) continue;
>>>               dist = flat_file->indices[i] + flat_file- 
>>> >blocklens[i] - offset;
>>>               /* frd_size is from offset to the end of block i */
>>>              if (dist == 0) {
>>>
>>>
>>> _______________________________________________
>>> mpich-discuss mailing list
>>> mpich-discuss at mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>>
>>
>
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list