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 the OMPI_CHECK_PACKAGE macro but in the OMPI_CHECK_PACKAGE_HEADER 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.

OMPI_CHECK_PACKAGE_LIB:
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.

Regards


------------------------------------------------------------------------

_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: b...@sara.nl      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************

Attachment: ompi_check_tm.m4
Description: application/m4

Reply via email to