[c3-users] [c3-devel] man c3.conf doesn't explain "dead remove_for_0-indexing"

Thomas Naughton naughtont at ornl.gov
Wed Mar 19 07:38:54 EDT 2014


Hi Olivier,

Responses inline below...

  _________________________________________________________________________
   Thomas Naughton                                      naughtont at ornl.gov
   Research Associate                                   (865) 576-4184


On Wed, 19 Mar 2014, LAHAYE Olivier wrote:

>
> Thanks a lot for clarification, I now understand the trick relative to 0-indexing ;-)
>

Welcome, glad it helped.


> Though, regarding the exclude and dead keyworks I still have some questions I can't find solution in the man.
>
> Can I have:
>
> cluster my_cluster {
>    head
>    dead zero
>    node[1-8]
>    dead node3
> }
>

No, "dead" qualifier only applies to individuatl node defintions.  The range
definition 'node[1-8]' requires that you use the 'exclude' qualifier.

Off the top of my head, I'm not sure what happens if you use 'dead' in this
case, I'd expect it to just be ignore and at worse fail the parse.

> Can I have:
>
> cluster my_cluster2 {
>    head2
>    dead dummy
>    node[1-8]
>    exclude 2
>    node[9-20]
>    exclude 10
>    exclude 3
> }
>
> Will "exclude 3" affect node[1-8] or will it be ignored as it only deal with latest node[9-20] range?
>

The 'exclude' qualifier is for the immediately preceding range definition. 
Therefore, 'exclude 3' should not be valid.  Again, off the top of my head
I'm not sure if it will throw an error during parse or just be ignored.
You can use 'cexec' or 'cname' to check these configs.

> You can forward this to c3-users if you wish so it can be indexed by google.
>
> Best regards,
>
> Olivier.
>
> --
>   Olivier LAHAYE
>   CEA DRT/LIST/DIR
>
> ________________________________________
> De : Thomas Naughton [naughtont at ornl.gov]
> Envoyé : mardi 18 mars 2014 22:55
> À : Thomas Naughton
> Cc : LAHAYE Olivier; c3-devel at ornl.gov
> Objet : Re: [c3-devel] man c3.conf doesn't explain "dead remove_for_0-indexing"
>
> Hi Olivier,
>
>> I hope this helps.  After a review of the manual page the only thing I
>> saw that might need a comment is the 'dead remove_for_0-indexing'.  I'll
>> try to add a comment for future versions that mentions this useful (and
>> common) case.
>
> The following has been added to the C3.conf(5) manual page and will be included in future C3 releases.
>
>
>  NOTES
>    Zero vs. One Indexing
>      The  default  indexing  for a cluster description block is to use zero-
>      indexing.  It may be useful to place a "dummy" entry at  the  start  of
>      the  node  list to skip the 0-th index.  This will have the effect that
>      the first available node index for the cluster will be at ":1"  instead
>      of ":0".  For example:
>
>          cluster local {
>               htorc-00:node0              #head node
>               dead dummy_skip_0th_index   #skip 0th node index
>               node[01-64]                 #compute nodes
>          }
>
>
> Cheers,
> --tjn
>
>  _________________________________________________________________________
>   Thomas Naughton                                      naughtont at ornl.gov
>   Research Associate                                   (865) 576-4184
>
>
> On Tue, 18 Mar 2014, Thomas Naughton wrote:
>
>> Hi Olivier,
>>
>> I agree that the use of exclude can be a bit tricky.  I generally do a
>> quick test to confirm functionality.     See bottom of this email for a few
>> examples based on your question.
>>
>> The 'dead'    qualifier only applies to individual node definitions.
>> The 'exclude' qualifier only applies to node range definitions.
>> The 'exclude' qualifier applies to the immediately preceding range
>> definition.
>>
>> It is common practice to put a "dead remove_for_0-indexing" in the 0th node
>> position if you want to have your nodes start with 1-indexing.
>>
>>     cluster foo {
>>         node0
>>         dead dummy_this_is_ignored
>>         node1
>>     }
>>
>> This is simply a useful application of the 'dead' qualifier to support
>> non-Zero-indexing of the cluster.
>>
>> Here are 3 identical configurations that are expressed in different ways.
>> The 'c3-testexclude-mixed.conf' roughly mirrors your example, except I've
>> added a "dead dummy" do avoid 0th index.  The 'cname CLUSTER_NAME' just shows
>> what the config file sees as the names for the given cluster.
>>
>>   tjn at node0:~$ export C3_CONF=$HOME/c3-testdead.conf
>>   tjn at node0:~$ cat $C3_CONF
>>   cluster cluster1 {
>>       node0
>>       dead dummy
>>       node1
>>       node2
>>       node3
>>       dead node4
>>       node5
>>       node6
>>       dead node7
>>       node8
>>   }
>>   tjn at node0:~$ cexec hostname
>>   ************************* cluster1 *************************
>>   --------- node1---------
>>   node1
>>   --------- node2---------
>>   node2
>>   --------- node3---------
>>   node3
>>   --------- node5---------
>>   node5
>>   --------- node6---------
>>   node6
>>   --------- node8---------
>>   node8
>>   tjn at node0:~$ cname cluster1
>>   nodes from cluster:  cluster1
>>   cluster:  cluster1 ; node name:  dummy
>>   cluster:  cluster1 ; node name:  node1
>>   cluster:  cluster1 ; node name:  node2
>>   cluster:  cluster1 ; node name:  node3
>>   cluster:  cluster1 ; node name:  node4
>>   cluster:  cluster1 ; node name:  node5
>>   cluster:  cluster1 ; node name:  node6
>>   cluster:  cluster1 ; node name:  node7
>>   cluster:  cluster1 ; node name:  node8
>>   tjn at node0:~$
>>   tjn at node0:~$
>>
>>
>>   tjn at node0:~$ export C3_CONF=$HOME/c3-testexclude-compact.conf
>>   tjn at node0:~$ cat $C3_CONF
>>   cluster cluster1 {
>>       node0
>>       dead dummy
>>       node[1-8]
>>       exclude 4
>>       exclude 7
>>   }
>>   tjn at node0:~$ cexec hostname
>>   ************************* cluster1 *************************
>>   --------- node1---------
>>   node1
>>   --------- node2---------
>>   node2
>>   --------- node3---------
>>   node3
>>   --------- node5---------
>>   node5
>>   --------- node6---------
>>   node6
>>   --------- node8---------
>>   node8
>>   tjn at node0:~$ cname cluster1
>>   nodes from cluster:  cluster1
>>   cluster:  cluster1 ; node name:  dummy
>>   cluster:  cluster1 ; node name:  node1
>>   cluster:  cluster1 ; node name:  node2
>>   cluster:  cluster1 ; node name:  node3
>>   cluster:  cluster1 ; node name:  node4
>>   cluster:  cluster1 ; node name:  node5
>>   cluster:  cluster1 ; node name:  node6
>>   cluster:  cluster1 ; node name:  node7
>>   cluster:  cluster1 ; node name:  node8
>>   tjn at node0:~$
>>   tjn at node0:~$
>>   tjn at node0:~$
>>
>>
>>   tjn at node0:~$ export C3_CONF=$HOME/c3-testexclude-mixed.conf
>>   tjn at node0:~$ cat $C3_CONF
>>   cluster cluster1 {
>>       node0
>>       dead dummy
>>       node1
>>       node2
>>       node[3-7]
>>       exclude 4
>>       exclude 7
>>       node8
>>   }
>>   tjn at node0:~$ cexec hostname
>>   ************************* cluster1 *************************
>>   --------- node1---------
>>   node1
>>   --------- node2---------
>>   node2
>>   --------- node3---------
>>   node3
>>   --------- node5---------
>>   node5
>>   --------- node6---------
>>   node6
>>   --------- node8---------
>>   node8
>>   tjn at node0:~$ cname cluster1
>>   nodes from cluster:  cluster1
>>   cluster:  cluster1 ; node name:  dummy
>>   cluster:  cluster1 ; node name:  node1
>>   cluster:  cluster1 ; node name:  node2
>>   cluster:  cluster1 ; node name:  node3
>>   cluster:  cluster1 ; node name:  node4
>>   cluster:  cluster1 ; node name:  node5
>>   cluster:  cluster1 ; node name:  node6
>>   cluster:  cluster1 ; node name:  node7
>>   cluster:  cluster1 ; node name:  node8
>>
>>
>> I hope this helps.  After a review of the manual page the only thing I saw
>> that might need a comment is the 'dead remove_for_0-indexing'.  I'll try to
>> add a comment for future versions that mentions this useful (and common) case.
>>
>>
>> Cheers,
>> --tjn
>>
>>  _________________________________________________________________________
>>   Thomas Naughton                                      naughtont at ornl.gov
>>   Research Associate                                   (865) 576-4184
>>
>>
>> On Tue, 18 Mar 2014, LAHAYE Olivier wrote:
>>
>>> man c3.conf doesn't explain "dead remove_for_0-indexing"
>>>
>>> That would be cool to have some clarification about that line and about
>>> indexing in  general
>>>
>>> for example if i have the following cluster definition:
>>>
>>> cluster my_cluster {
>>>     foo
>>>     bar
>>>     big
>>>     extranode[1-9]
>>>     exclude 3
>>>     little
>>> }
>>>
>>> What is excluded?
>>> is it "big" that is excluded or is it extranode3???
>>> Does exclude applies on the extranode[] line or does it applies to all the
>>> above nodes definitions or does it apply to all nodes inthe cluster?
>>>
>>> Thanks for clarifying that.
>>>
>>>
>>> --
>>>    Olivier LAHAYE
>>>    CEA DRT/LIST/DIR
>>>
>>>


More information about the c3-users mailing list