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) {
>> #if OPAL_HAVE_HWLOC
>>      // ...use hwloc API, etc.
>> #endif
>>  }

This really should be:

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

Sorry for the confusion!

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to