Open MPI logo

Open MPI 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: [OMPI devel] RFC: make hwloc be a 1st-class citizen
From: Kenneth Lloyd (kenneth.lloyd_at_[hidden])
Date: 2011-09-12 09:46:06

According to

"The `#if' directive allows you to test the value of an arithmetic
expression, rather than the mere existence of one macro."

Is the objective to test for the existence of the macro, its value, or its
value IFF it exists?

Ken Lloyd

-----Original Message-----
From: devel-bounces_at_[hidden] [mailto:devel-bounces_at_[hidden]] On
Behalf Of Jeff Squyres
Sent: Monday, September 12, 2011 7:07 AM
To: Open MPI Developers
Subject: Re: [OMPI devel] RFC: make hwloc be a 1st-class citizen

On Sep 12, 2011, at 8:51 AM, Jeff Squyres wrote:

> *** Remember that although the opal_hwloc_topology global variable will
always be available, ##IT MAY BE NULL## on platforms where hwloc was
compiled out / not supported. Therefore, you MUST protect access to hwloc
API calls with #if OPAL_HAVE_HWLOC! See the original RFC text below.

Oops! Ralph just reminded me that this was slightly inaccurate.

If hwloc is not present, then the global variable opal_hwloc_topology won't
be present at all (because its corresponding hwloc type won't be available).
Hence, the example in the original RFC isn't quite right:

>> if (NULL != opal_hwloc_topology) {
>> // ...use hwloc API, etc.
>> #endif
>> }

This really should be:

  if (NULL != opal_hwloc_topology) {
      // ...use hwloc API, etc.

Sorry for the confusion!

Jeff Squyres
For corporate legal information go to:
devel mailing list
No virus found in this message.
Checked by AVG -
Version: 10.0.1392 / Virus Database: 1520/3891 - Release Date: 09/11/11