How about displaying a warning if --get is specified but a command to execute 
is also specified?

Sent from my phone. No type good. 

> On Aug 13, 2014, at 5:22 AM, "John Donners" <john.donn...@surfsara.nl> wrote:
> 
> Hi Brice,
> 
>> On 13-08-14 10:46, Brice Goglin wrote:
>> Hello,
>> 
>> Can you elaborate how you would use this?
>> 
>> The intend of the current behavior is:
>> 1) if the target task already runs, use "hwloc-bind --pid <pid> --get"
>> without any command since you have pid already
> this behaviour stays the same with the patch.
>> 2) you just want to check whether the upcoming binding works, so you
>> just do something like "mpirun .... hwloc-bind --get" or "srun ...
>> hwloc-bind --get"
>> 
>> Do you want a mode that creates a new task and displays it binding?
> indeed.
>> Looks similar to passing "hwloc-bind --get ; newtask" to srun or mpirun ?
> the syntax would then be something like:
> 
> mpirun -n 2 bash -c "hwloc-bind --get ; newtask"
> 
> it's possible, but quite ugly.
> 
> With regards,
> John
>> 
>> Brice
>> 
>> 
>> 
>> Le 13/08/2014 10:38, John Donners a écrit :
>>> Hi,
>>> 
>>> I was somewhat surprised to notice that hwloc-bind doesn't
>>> execute the command if the --get option is used. This could
>>> come in handy to check the binding set by other programs,
>>> e.g. SLURM, mpirun or taskset. The following patch would
>>> change this.
>>> 
>>> --- hwloc-1.9/utils/hwloc-bind.c    2014-03-17 16:42:36.000000000 +0100
>>> +++ hwloc-1.9/utils/hwloc-bind.c.getproc    2014-08-13
>>> 10:24:17.832682576 +0200
>>> @@ -301,7 +301,9 @@
>>>      else
>>>        printf("%s\n", s);
>>>      free(s);
>>> -    return EXIT_SUCCESS;
>>> +    if (get_last_cpu_location) {
>>> +      return EXIT_SUCCESS;
>>> +    }
>>>    }
>>>      if (got_membind) {
>>> 
>>> Please consider this change for the next release of hwloc.
>>> 
>>> With regards,
>>> John
>>> 
>>> 
>>> | John Donners | Senior adviseur | Operations, Support & Development |
>>> SURFsara | Science Park 140 | 1098 XG Amsterdam | Nederland |
>>> T (31)6 19039023 | john.donn...@surfsara.nl | www.surfsara.nl |
>>> 
>>> Aanwezig op | ma | di | wo | do | vr
>>> 
>>> _______________________________________________
>>> hwloc-devel mailing list
>>> hwloc-de...@open-mpi.org
>>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>>> Link to this post:
>>> http://www.open-mpi.org/community/lists/hwloc-devel/2014/08/4171.php
>> _______________________________________________
>> hwloc-devel mailing list
>> hwloc-de...@open-mpi.org
>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>> Link to this post: 
>> http://www.open-mpi.org/community/lists/hwloc-devel/2014/08/4172.php
> 
> 
> -- 
> Probeer de SURFsara app! Beschikbaar voor iOS en Android.
> 
> | John Donners | Senior adviseur | Operations, Support & Development | 
> SURFsara | Science Park 140 | 1098 XG Amsterdam | Nederland |
> T (31)6 19039023 | john.donn...@surfsara.nl | www.surfsara.nl |
> 
> Aanwezig op | ma | di | wo | do | vr
> 
> _______________________________________________
> hwloc-devel mailing list
> hwloc-de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
> Link to this post: 
> http://www.open-mpi.org/community/lists/hwloc-devel/2014/08/4172.php

Reply via email to