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] PPC64 problem with hwloc 1.1.1
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2011-02-23 02:49:07


Note that we may also get the same warning if the user gives a distance
matrix that conflicts with what the OS says. I don't know if we could
detect this conflict in advance to avoid the warning.

Brice

Le 23/02/2011 00:20, Jeff Squyres a écrit :
> On Feb 22, 2011, at 6:02 PM, Samuel Thibault wrote:
>
>
>> Note the "/* TODO: how to report? */" comment in the code: we definitely
>> _want_ to get users to see the warning and report it.
>>
> Ah, ok. Could we make that message a little more clear, then? Maybe something like this:
>
> Index: src/topology.c
> ===================================================================
> --- src/topology.c (revision 3200)
> +++ src/topology.c (working copy)
> @@ -48,7 +48,24 @@
> return HWLOC_API_VERSION;
> }
>
> +static void hwloc_report_error(const char *msg, int line)
> +{
> + static int reported = 0;
>
> + if (!reported) {
> + fprintf(stderr, "****************************************************************************\n");
> + fprintf(stderr, "* Hwloc has encountered what looks like an error from the operating system.\n");
> + fprintf(stderr, "*\n");
> + fprintf(stderr, "* %s\n", msg);
> + fprintf(stderr, "* Error occurred in topology.c line %d\n", line);
> + fprintf(stderr, "*\n");
> + fprintf(stderr, "* Please report this error message to the hwloc user's mailing list,\n");
> + fprintf(stderr, "* along with the output from the hwloc-gather-topology script.\n");
> + fprintf(stderr, "****************************************************************************\n");
> + reported = 1;
> + }
> +}
> +
> static void
> hwloc_topology_clear (struct hwloc_topology *topology);
>
> @@ -704,7 +721,7 @@
> case HWLOC_OBJ_INCLUDED:
> if (container) {
> /* TODO: how to report? */
> - fprintf(stderr, "object included in several different objects!\n");
> + hwloc_report_error("object included in several different objects!", __LINE__);
> /* We can't handle that. */
> return;
> }
> @@ -713,7 +730,7 @@
> break;
> case HWLOC_OBJ_INTERSECTS:
> /* TODO: how to report? */
> - fprintf(stderr, "object intersection without inclusion!\n");
> + hwloc_report_error("object intersection without inclusion!", __LINE__);
> /* We can't handle that. */
> return;
> case HWLOC_OBJ_CONTAINS:
>
>