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: [hwloc-devel] topology-x86.c warning
From: Jeffrey Squyres (jsquyres_at_[hidden])
Date: 2012-03-15 21:04:04

I found this warning in OMPI 1.5:

  CC topology-x86.lo
topology-x86.c: In function 'look_proc':
topology-x86.c:189: warning: 'ways' may be used uninitialized in this function

On the hwloc trunk, the ways variable is not initialized, and there's an "if" block where one of the branches initializes it and the other does not. Then below this conditional assignment, it has a comment:

      cache->size = linesize * linepart * ways * sets; /* FIXME: what if ways == -1 ? */

Which is somewhat amusing because ways was never set to -1. :-)

Should it be initialized to -1, or set to -1 in the "if" block right above it? And what to do if it is -1 in the cache->size assignment?

Jeff Squyres
For corporate legal information go to: