[mvapich-discuss] How do I patch mvapich2-2.2 to set MV2_ENABLE_AFFINITY default 0

Hari Subramoni subramoni.1 at osu.edu
Fri Sep 30 14:23:36 EDT 2016


Hi Maksym,

I misread your earlier e-mail. The comment "default on/off" is not correct.
The field external_visible was meant for adding functionality (similar to
what you've indicated). However, it has not been done yet.

Thank you for pointing out the spelling mistake. We will correct it in a
future release.

Thx,
Hari.

On Fri, Sep 30, 2016 at 2:10 PM, Maksym Planeta <
mplaneta at os.inf.tu-dresden.de> wrote:

> Yes, I see that. But my guess for name "external_visible" would be that
> the variable should not be changed by user, instead it is used by a process
> launcher. And "default on/off" I interpret differently.
>
> So, I do not understand the meaning of the field. It is never used, even
> inside printing routine (mv2_show_all_params). And also there is a typo.
> The field is called "extrenal_visible", not external.
>
> On 09/30/2016 08:02 PM, Hari Subramoni wrote:
>
>> Neither is wrong. That structure is just for displaying the list of
>> env vars. It does not modify the value of the variable.
>>
>> Thx,
>> Hari.
>>
>> On Fri, Sep 30, 2016 at 1:56 PM, Maksym Planeta
>> <mplaneta at os.inf.tu-dresden.de <mailto:mplaneta at os.inf.tu-dresden.de>>
>> wrote:
>>
>>     Limin tried to change value 1 to 0 in param_list structure. The
>> comment
>>     on the top in ibv_env_params.c says that the field with 0 means
>> "default
>>     on/off", which I would interpret as default value. But field name in
>>     ibv_param.h is "external_visible". I think either is wrong.
>>
>>     On 09/30/2016 07:48 PM, Hari Subramoni wrote:
>>
>>         Hi Limin,
>>
>>         I agree with Maksym's observations.
>>
>>         That patch will not work. I'd recommend the following.
>>
>>         diff --git a/src/mpid/ch3/channels/common
>> /src/affinity/hwloc_bind.c
>>         b/src/mpid/ch3/channels/common/src/affinity/hwl index
>>         cdcec6f..80698c8 100644 ---
>>         a/src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c +++
>>         b/src/mpid/ch3/channels/common/src/affinity/hwloc_bind.c @@ -51,7
>>         +51,7 @@ int *local_core_ids = NULL; int mv2_user_defined_mapping
>> =
>>         FALSE;
>>
>>
>>         -unsigned int mv2_enable_affinity = 1; +unsigned int
>>         mv2_enable_affinity = 0; unsigned int mv2_enable_leastload = 0;
>>         unsigned int mv2_hca_aware_process_mapping = 1;
>>
>>         Thx, Hari.
>>
>>         On Fri, Sep 30, 2016 at 1:36 PM, Limin Gu
>>         <lgu at penguincomputing.com <mailto:lgu at penguincomputing.com>
>>         <mailto:lgu at penguincomputing.com
>>         <mailto:lgu at penguincomputing.com>>> wrote:
>>
>>         Thank Maksym!
>>
>>         I am building mvapich2 for customers, and would like to have
>> default
>>          to 0 instead of asking everybody to change their .bashrc.
>>
>>         But will the patch work?
>>
>>         Limin
>>
>>         On Fri, Sep 30, 2016 at 1:26 PM, Maksym Planeta
>>         <mplaneta at os.inf.tu-dresden.de
>>         <mailto:mplaneta at os.inf.tu-dresden.de>
>>         <mailto:mplaneta at os.inf.tu-dresden.de
>>
>>         <mailto:mplaneta at os.inf.tu-dresden.de>>> wrote:
>>
>>         Hi,
>>
>>         you can put this variable in a script you use to submit your jobs.
>>         Or put it in .bashrc. Patching a library for that looks like a
>> huge
>>         overkill.
>>
>>
>>         On 09/30/2016 07:21 PM, Limin Gu wrote:
>>
>>         Hello all,
>>
>>         I would like to set MV2_ENABLE_AFFINITY default to 0, what's the
>>         best
>>         way to do it?
>>
>>         I do not want to configure with --disable-hwloc, or have user
>>         have to
>>         specify MV2_ENABLE_AFFINITY=0 on command line.
>>
>>         Will following patch effectively change the default to 0?
>>
>>         diff -Nur src.orig/mpid/ch3/channels/mra
>> il/src/gen2/ibv_env_params.c
>>          src/mpid/ch3/channels/mrail/src/gen2/ibv_env_params.c
>>
>>         ---
>>         src.orig/mpid/ch3/channels/mrail/src/gen2/ibv_env_params.c20
>> 16-09-30
>>          10:11:30.288322611 -0700
>>
>>         +++ src/mpid/ch3/channels/mrail/src/gen2/ibv_env_params.c2016-09
>> -30
>>         10:11:44.909321846 -0700
>>
>>         @@ -1473,7 +1473,7 @@
>>
>>         MV2_PARAM_GROUP_intranode,
>>
>>         "MV2_ENABLE_AFFINITY",
>>
>>         &mv2_enable_affinity,
>>
>>         -    1,
>>
>>         +    0,
>>
>>         NULL    },
>>
>>         {
>>
>>         MV2_HCA_AWARE_PROCESS_MAPPING,
>>
>>
>>
>>
>>
>>         Thank you!
>>
>>
>>
>>
>>
>>         _______________________________________________ mvapich-discuss
>>         mailing list mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>
>>         <mailto:mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>>
>>         http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-d
>> iscuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>>
>>
>>
>>         -- Regards, Maksym Planeta
>>
>>
>>         _______________________________________________ mvapich-discuss
>>         mailing list mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>
>>         <mailto:mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>>
>>         http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-d
>> iscuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>>
>>
>>
>>
>>         _______________________________________________ mvapich-discuss
>>         mailing list mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>
>>         <mailto:mvapich-discuss at cse.ohio-state.edu
>>         <mailto:mvapich-discuss at cse.ohio-state.edu>>
>>         http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-d
>> iscuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss
>>         <http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-
>> discuss>>
>>
>>
>>
>>     --
>>     Regards,
>>     Maksym Planeta
>>
>>
>>
> --
> Regards,
> Maksym Planeta
>
>
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20160930/62c1fd9b/attachment-0001.html>


More information about the mvapich-discuss mailing list