( 2 replies in one )

Thanks all for commenting ... See below.

On 02/20/2012 07:54 PM, Danny Auble wrote:
> I suppose the question is what is the float to be used for.  There are
> already (un)packdouble functions so passing it around to various tools
> should be fine.  I think when this has come up in other places it was
> read in as a string and translated to a double afterwards.  I couldn't
> find anywhere in the code where it was happening like this but I didn't
> look very hard.

Mark just pointed it out below ...

>   I don't think adding the new function to read it in is
> a horrible idea, it was probably just never really needed.  So back to
> the first question, what is the float/double to e used for ;).

I need to set a timeout parameter "factor" based on the #nodes in the 
step nodelist, ie,
something in the lines of:

float TimeoutMin    =  16.0;
         TimeoutFactor = 1.0; // Default
Timeout = MAX( TimeoutMin, ( int ) ( (float) #nodes * TimeoutFactor ) );


where TimeoutFactor is a slurm.conf S_P_FLOAT value. Since it's a conf 
thingy, I believe
it need to go "on the wire" as well.


>   Perhaps
> it doesn't need to be a float.  But it may be this is the only option.
>

As I commented below, that would to the "inconsistencies list" a little 
bit, no ?

> Danny
>

On 02/20/2012 08:24 PM, Mark A. Grondona wrote:
> On Mon, 20 Feb 2012 15:54:05 -0700, Michel Bourget<[email protected]>  wrote:
>> Hi all,
>>
>> somehow, I need to introduce handling a "float" value in slurm.conf and,
>> of course,
>> carry/dislay/obtain it.  I noticed it's not there. before I go introduce it,
>> is there any reason ( I am not aware of ) it's not there ,
>> except for the fact " we never needed it before" ?
> There is a floating point config handler in the cgroup.conf code.
> However, this code doesn't need to transmit the value over the wire.
> If you do implement an S_P_FLOAT, it would be nice to also "fix"
> the code in xcgroup_read_config, which currently reads the value
> as S_P_STRING and converts it.
>

Good point.

> I also thought I saw some code in the pack routines that tried
> to handle double types. You may have seen that already.
>

{pack,unpack}double seems to be used mostly for slurmdb such as 
vsise_ave, cpu_ave, etc ...


> Another alternative is to store floats as an integer with a
> "multiplier" (e.g. if you need 3 decimal places, have a multiplier
> of 1000).
>

I admit I am tempted but that would add to the inconsistency list, no ?


So, may I propose adding patch that will:
- introduce S_P_FLOAT support
- introduce {pack,unpack}float
- fix xcgroup_read_config ( and related if ever ) to use S_P_FLOAT
- last item a separate patch ?

TIA

> mark
>
>> A+
>>
>> -- 
>>
>> -----------------------------------------------------------
>>        Michel Bourget - SGI - Linux Software Engineering
>>       "Past BIOS POST, everything else is extra" (travis)
>> -----------------------------------------------------------



> On 02/20/12 14:42, Michel Bourget wrote:
>> Hi all,
>>
>> somehow, I need to introduce handling a "float" value in slurm.conf and,
>> of course,
>> carry/dislay/obtain it.  I noticed it's not there. before I go introduce it,
>> is there any reason ( I am not aware of ) it's not there ,
>> except for the fact " we never needed it before" ?
>>
>> A+
>>


-- 

-----------------------------------------------------------
      Michel Bourget - SGI - Linux Software Engineering
     "Past BIOS POST, everything else is extra" (travis)
-----------------------------------------------------------

Reply via email to