Khalid,

The rule number zero is always selected by default. If the size you look
for (message or communicator) is larger than zero then another rule will be
selected, otherwise zero is the best selection. Same thing for communicator
and size, a consistent approach from my perspective.

If you don't want to define the behavior for a particular range you should
set the algorithm of the range to zero, in which case the control will be
given back (for that particular range) to the default algorithm selection
function (the one hardcoded in Open MPI).

So going back to your example, if what you expect not to select an
algorithm for communicator sizes less than 5, add a rule for a communicator
size of zero for using the algorithm zero. In this case, the rule 0 will be
automatically the default until another one is matched.

  George.


On Wed, May 20, 2015 at 7:52 PM, Khalid Hasanov <xali...@gmail.com> wrote:

> George,
>
> Thank you for your answer.
>
> Another confusing thing is that, If I use some communicator size which
> does not exist in the configuration file, some rule from the configuration
> file will be used anyway.
> For example, let say I have a configuration file with two communicator
> sizes 5 and 16. If I execute mpirun with any number of processes from 2 up
> to 15 then the rule for communicator of size 5 (the first in the config
> file) is used. If I use mpirun with -n 16 or greater then the rule for 16
> (the last in the config file) is going to be used.
>
> I am not sure if the exclusive approach you mentioned applies here as well.
>
> Thanks.
>
> Best regards,
> Khalid
>
>
>
> On Thu, May 21, 2015 at 12:05 AM, George Bosilca <bosi...@icl.utk.edu>
> wrote:
>
>> Khalid,
>>
>> The way we designed these rules was to define intervals in a 2 dimension
>> space (communicator size, message size). You should imagine these rules as
>> exclusive, you match them in the order defined by the configuration file
>> and you use the algorithm defined by the last matching rule.
>>
>>   George.
>>
>>
>> On Tue, May 19, 2015 at 9:30 PM, Khalid Hasanov <xali...@gmail.com>
>> wrote:
>>
>>> Hi Gilles,
>>>
>>> Thank you a lot, it works now.
>>>
>>> Just one minor thing I have seen now. If I use some communicator size
>>> which does not exist in the configuration file, it will still use the
>>> configuration file. For example, if I use the previous config file with
>>> mpirun -n 4 it will use the config for the comm size 5 (the first one). The
>>> same happens if n is less than 16. If n > 16 it will use the config for the
>>> communicator size 16 (the second one). I am writing this just in case it is
>>> not expected behaviour.
>>>
>>> Thanks again.
>>>
>>> Best regards,
>>> Khalid
>>>
>>>
>>> On Wed, May 20, 2015 at 2:12 AM, Gilles Gouaillardet <gil...@rist.or.jp>
>>> wrote:
>>>
>>>>  Hi Khalid,
>>>>
>>>> i checked the source code and it turns out rules must be ordered :
>>>> - first by communicator size
>>>> - second by message size
>>>>
>>>> Here is attached an updated version of the ompi_tuned_file.conf you
>>>> should use
>>>>
>>>> Cheers,
>>>>
>>>> Gilles
>>>>
>>>>
>>>> On 5/20/2015 8:39 AM, Khalid Hasanov wrote:
>>>>
>>>>  Hello,
>>>>
>>>> I am trying to use coll_tuned_dynamic_rules_filename option.
>>>>
>>>>  I am not sure if I do everything right or not. But my impression is
>>>> that config file feature does not work as expected.
>>>>
>>>> For example, if I specify config file as in the attached
>>>> ompi_tuned_file.conf and execute the attached simple broadcast example as :
>>>>
>>>>
>>>>>   mpirun -n 16 --mca coll_tuned_use_dynamic_rules 1  --mca
>>>>> coll_tuned_dynamic_rules_filename ompi_tuned_file.conf   -mca
>>>>> coll_base_verbose 1  bcast_example
>>>>>
>>>>>
>>>>> <https://mail.google.com/mail/u/0/?ui=2&ik=e63390c27f&view=att&th=14d6e6bef2c6fbca&attid=0.2&disp=safe&realattid=f_i9vxd25k1&zw>
>>>>> I would expect that during run time the config file should be ignored
>>>>> as it does not contain any configuration for communicator size 16. 
>>>>> However,
>>>>> it uses configuration for the last communicator for which the size is 5. I
>>>>> have attached tuned_output file for more information.
>>>>>
>>>>>  Similar problem exists even if the configuration file contains
>>>>> config for communicator size 16. For example , I added to the 
>>>>> configuration
>>>>> file first communicator size 16 then communicator size 5. But it used
>>>>> configuration for communicator size 5.
>>>>>
>>>>>  Another interesting thing is that if the second communicator size is
>>>>> greater than the first communicator in the config file then it seems to
>>>>> work correctly. At least I tested it for the case where communicator one
>>>>> had size 16 and second had 55.
>>>>>
>>>>>
>>>>>  I used a development version of Open MPI (1.9.0a1). I forked it into
>>>>> my own github (https://github.com/khalid-hasanov/ompi) and I have
>>>>> attached ompi_info outputs as well.
>>>>>
>>>>>  I have added some printfs into coll_tuned_decision_dynamic.c file to
>>>>> double check it:
>>>>>
>>>>>  if (alg) {
>>>>>
>>>>>         printf("Men burdayam: alg=%d\n", alg);
>>>>>
>>>>>             /* we have found a valid choice from the file based rules
>>>>> for this message size */
>>>>>
>>>>>             return ompi_coll_tuned_bcast_intra_do_this (buff, count,
>>>>> datatype, root,
>>>>>
>>>>>                                                         comm, module,
>>>>>
>>>>>                                                         alg, faninout,
>>>>> segsize);
>>>>>
>>>>>         } /* found a method */
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  Best regards,
>>>>> Khalid
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing listus...@open-mpi.org
>>>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>> Link to this post: 
>>>> http://www.open-mpi.org/community/lists/users/2015/05/26882.php
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> us...@open-mpi.org
>>>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>> Link to this post:
>>>> http://www.open-mpi.org/community/lists/users/2015/05/26885.php
>>>>
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> us...@open-mpi.org
>>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
>>> Link to this post:
>>> http://www.open-mpi.org/community/lists/users/2015/05/26886.php
>>>
>>
>>
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
>> Link to this post:
>> http://www.open-mpi.org/community/lists/users/2015/05/26896.php
>>
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post:
> http://www.open-mpi.org/community/lists/users/2015/05/26897.php
>

Reply via email to