Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] MPICH2 question
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2009-10-21 17:30:24


Pavan Balaji, le Wed 21 Oct 2009 13:23:39 -0500, a écrit :
> On 10/21/2009 10:38 AM, Samuel Thibault wrote:
> > Pavan Balaji, le Wed 21 Oct 2009 10:36:33 -0500, a écrit :
> >> On 10/21/2009 10:28 AM, Samuel Thibault wrote:
> >>> Pavan Balaji, le Wed 21 Oct 2009 09:55:36 -0500, a écrit :
> >>>> 1. I see a AC_PROG_CC_C99 in the configure.ac. Do you require the
> >>>> compiler to be C99 capable always?
> >>> No, we ended up using constructs which should pass c90 and the compilers
> >>> we have tested (aix, solaris, icc).
> >> So shouldn't the AC_PROG_CC_C99 be gotten rid of?
> >
> > No because when C99 is available, we enable some optimization features,
> > like __hwloc_restrict.
>
> It looks like __hwloc_restrict is not actually checking for C99, but
> instead doing something GNU specific:

It's doing both: if gcc is available, use __restrict, if C99 is
available, use restrict.

> #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
> # define __hwloc_restrict __restrict
> #else
> # if __STDC_VERSION__ >= 199901L
> # define __hwloc_restrict restrict
> # else
> # define __hwloc_restrict
> # endif
> #endif
>
> Wouldn't it be better to add a feature test for restrict, instead of this?

Please read this thread:

http://www.open-mpi.org/community/lists/hwloc-devel/2009/09/0054.php

Samuel