[Pvfs2-developers] Passing the entire param struct

Walter B. Ligon III walt at clemson.edu
Wed Mar 7 15:54:04 EST 2007


This sounds reasonable.

Walt

Sam Lang wrote:
> 
> On Mar 7, 2007, at 12:32 PM, Robert Latham wrote:
> 
>> On Sun, Mar 04, 2007 at 03:23:30PM +0100, Julian Martin Kunkel wrote:
>>
>>> I found some unexpected behavior in the distribution behavior if I
>>> set in  MPI-programs the MPI hint striping_unit to (whatever) value.
>>
>>
>> Thanks for the bug report.  This one was rather gross.  I've  attached 
>> a patch
>> to fix it.
>>
>> Turns out when you pass a pointer-to-int instead of a pointer-to-int64
>> to a function that takes a void*, you get garbled data and a strp size
>> of 584382286904951784 bytes.  that's 0x81c2498000003e8, and 0x3e8 ==
>> 1000 (8 bytes of real data and 8 bytes of random memory).
>>
>> Sam's come up with a proposal to make this sort of bug harder to
>> trigger.  We can discuss that in a separate thread.
>>
> 
> My proposal is to change the PVFS_dist_set_param call to take the  
> entire distribution param struct, instead of individual fields within  
> that struct.  This would force callers to first get the current  
> parameters, so that they weren't overwriting fields that had already  
> been set, but it would prevent the type error that occurred above.   
> Also, for distributions with many parameters (instead of just one  like 
> simple stripe), it would probably be easier to do:
> 
> struct crazy_dist_params params;
> get_params(&params);
> params.param1 = 100;
> ...
> params.paramN = "hi";
> set_params(&params);
> 
> Currently, we would have to call set_param for each field.
> 
> In PINT_dist_default_set_param, we get the offset into the param  struct 
> based on the field name.  Sort of a home-baked runtime  reflection in 
> C.  I think we could avoid all that by just passing in  the entire param 
> struct.
> 
> -sam
> 
>> ==rob
>>
>> -- 
>> Rob Latham
>> Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
>> Argonne National Lab, IL USA                 B29D F333 664A 4280 315B
>> <sys_dist_setparam.patch>
>> _______________________________________________
>> Pvfs2-developers mailing list
>> Pvfs2-developers at beowulf-underground.org
>> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers
> 
> 
> _______________________________________________
> Pvfs2-developers mailing list
> Pvfs2-developers at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

-- 
Dr. Walter B. Ligon III
Associate Professor
ECE Department
Clemson University


More information about the Pvfs2-developers mailing list