Open MPI logo

Open MPI User's 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.

From: Brian Barrett (bbarrett_at_[hidden])
Date: 2007-04-12 10:31:45

On Apr 12, 2007, at 3:45 AM, Bas van der Vlies wrote:

> Jeff Squyres wrote:
>> On Apr 11, 2007, at 8:08 AM, Bas van der Vlies wrote:
>>>> The OMPI_CHECK_PACKAGE macro is a rather nasty macro that tries
>>>> to reduce the replication of checking for a header then a
>>>> library, then setting CFLAGS, LDFLAGS, LIBS, and all that.
>>>> There are two components that use the TM libraries, so we have
>>>> a centralized macro that sets the configuration data for the
>>>> two components. The -I, -L, -ls are set in OMPI_CHECK_PACKAGE.
>>>> In the OMPI_CHECK_TM macro, you probably want to check for pbs-
>>>> config, then if that fails, run the OMPI_CHECK_PACKAGE stuff.
>>>> Of course, you might want to run the OMPI_CHECK_PACKAGE code
>>>> with CFLAGS and LDFLAGS set to what you get from pbs-config, to
>>>> make sure the libraries actually work. The way we set flags is
>>>> a bit weird -- you need to set the environment variables:
>>>> $1_CPPFLAGS
>>>> $1_CFLAGS
>>>> $1_LDFLAGS
>>>> $1_LIBS
>>> I have made a crude version that uses 'pbs-config' and check uses
>>> macro /include is appended if it not /usr or /usr/include. So
>>> there must option to prevent this (pbs-config give the right
>>> value). Then i do not have to set the CPPFLAGS variable.
>>> For the library name there is also -l prepended so i can not use
>>> the name form 'pbs-config --libs' and it as the same problem as
>>> with checking the header if it is not standard then /lib is
>>> appended.
>> What about assigning $1_<foo> directly and then passing flags that
>> will be ignored to OMPI_CHECK_PACKAGE (e.g., "/usr")? I have not
>> tried this at all -- just hacked this in emacs. So it may not
>> even compile -- you'll need to test it. See new attachment. :-)
>> --Jeff Squyres
>> Cisco Systems
> Jeff,
> Maybe is was not clear enough ;-). The $1_<FLAGS> do not work i
> had to use CPPFLAGS instead of $1_CPPFLAGS else the test fails. On
> our site the torque library is found in /usr/lib so that can be
> found else we also
> must set the LDFLAGS flag.
> I have the right values of include/library directory but they are
> handled as directory prefix by the OMPI_CHECK_PACKAGE macro and not
> as directory.
> What i tried to accomplish was that the library name was set by a
> variable. So if torque decided to use another name for the library
> we do not have to change the macro again.

Sorry not to respond yesterday -- I was frantically writing a couple
of papers that desperately needed finishing. Anyway, yeah, I forgot
that OMPI_CHECK_PACKAGE did all that stuff (I don't know why I forgot
-- that's the whole point of OMPI_CHECK_PACKAGE). Anyway, I'd just
figure out what the CFLAGS, LDFLAGS, and LIBS required for TM are
(using pbs-config, of course), then call an AC_CHECK_HEADER and
AC_CHECK_LIB to make sure the headers and libs are ok. Then set $1_
{CFLAGS, LDFLAGS, LIBS} as needed and return. Just remember that if
you set something in CFLAGS or friends during the macro, that you
should remove it before the macro returns so that all the other
configure tests don't have those values.