On Apr 6, 2007, at 10:42 AM, Bas van der Vlies wrote:

On Apr 6, 2007, at 6:18 PM, Jeff Squyres wrote:

On Apr 6, 2007, at 12:14 PM, Bas van der Vlies wrote:

Have you run into a situation where OMPI gets the wrong flags
because
it's not using pbs-config?

Yes, We install the torque header files in /usr/include/torque and
the libraries in /usr/lib. This setup does not work with openmpi
configure script. When i use the --with-tm option and set it to / usr/
include/torque the configiure script appends "include" to it, so it
becomes /usr/include/torque/include.

Ah.  Well, that probably raises the priority a bit.  :-)

;-)

Do you know anything about configure scripts / m4?  I can't guarantee
that I will be able to look at this in the immediate future, but the
place to put this stuff would be in config/ompi_check_tm.m4.

Oke i can check it. I know a little bit about configure/m4 scripts.
I have seen that one but did not find why include was appended
to the --with-tm value. I could find that code in configure script.

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

You only have to set the ones that need to be used, of course.

The hard part is going to be splitting out the LDFLAGS and the LIBS, as our build system might actually care about that, but pbs-config doesn't. I'm not sure whether this is a big deal or not...

Brian

Reply via email to