Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] gather-topology fix and manpage
From: Jiri Hladky (hladky.jiri_at_[hidden])
Date: 2010-12-20 18:37:51


Brice,

thanks for looking into it!

Regarding the naming. I would argue that since the utility is currently
called
hwloc-gather-topology.sh
then the man page should be named
hwloc-gather-topology.sh.1

What's your opinion?

I have just one question regarding this code:
if [ -z "$name" -o x`echo $name | cut -c1` = x- ]

You code is definitely more portable than the code I have proposed. getopt
might not be available on all systems.

Your code will give a usage message whenever -<anything> is used. Would not
be better to use the case statement to check if
-h | --help has been used to give the usage message
-<anything> to check if invalid option has been entered and give: error
message Unknown option and usage message
Proceed otherwise.

This is how most program will work.

BTW, there are Bash's native commands to get a substring.
${string:position:length}. To get the first char just do
echo ${name:0:1}
See http://tldp.org/LDP/abs/html/string-manipulation.html

Also, is there any reason not have -h|--help officially documented in the
man page?

There won't be any 1.1.1 release before a couple weeks obviously. So if
> you want to upload some RPM packages before 2011, you will have to patch
> 1.1 anyway.
>

All right, once we agree on the proposed changes I will create rpm based on
1.1 with few patches.

Cheers,
Jirka

On Mon, Dec 20, 2010 at 8:50 AM, Brice Goglin <Brice.Goglin_at_[hidden]> wrote:

> Jirka,
> I have committed (locally) some changes that should address everything
> you reported and that are ok to backport in 1.1. I improved your manpage
> proposal too. See attached. By the way, I don't know if the manpage
> should be named .1 or .sh.1.
> There won't be any 1.1.1 release before a couple weeks obviously. So if
> you want to upload some RPM packages before 2011, you will have to patch
> 1.1 anyway.
> Cheers,
> Brice
>
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>
>