Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [hwloc-devel] Strange difference
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2013-10-12 14:44:45


Yo Ralph,
The reason is that get_type_depth() returns negative numbers for errors
(when the type doesn't exist or exists multiple times in the topology).
topology_get_depth() never fails, so always returns >=0.
And indeed that's annoying when the compiler is picky.
Brice

Le 12/10/2013 20:37, Ralph Castain a écrit :
> Yo guys
>
> I was doing some work that involved traversing the hwloc topo tree, and encountered the following odd discrepancy.
>
> hwloc_topology_get_depth => returns "unsigned"
>
> hwloc_get_type_depth => returns "int"
>
> Why the difference? Makes it hard sometimes to avoid the "comparison between unsigned and signed" warnings when using these functions.
> Ralph
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel