Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] FreeBSD timer_base_open error?
From: Brian W. Barrett (brbarret_at_[hidden])
Date: 2008-03-26 11:07:48


George -

Good catch -- that's going to cause a problem :). But I think we should
add yet another check to also make sure that we're on Linux. So the three
tests would be:

   1) Am I on a platform that we have timer assembly support for?
      (That's the long list of architectures that we recently,
      and incorrectly, added).
   2) Am I on Linux (since we really only know how to parse
      /proc/cpuinfo on Linux)
   3) Is /proc/cpuinfo readable (Because we have a couple architectures
      that are reported by config.guess as Linux, but don't have
      /proc/cpuinfo).

Make sense?

Brian

On Wed, 26 Mar 2008, George Bosilca wrote:

> I was working off-list with Brad on this. Brian is right, the logic in
> configure.m4 is wrong. It overwrite the timer_linux_happy to yes if the host
> match "i?86-*|x86_64*|ia64-*|powerpc-*|powerpc64-*|sparc*-*". On FreeBSD host
> is i386-unknown-freebsd6.2.
>
> Here is a quick and dirty patch. I just move the selection logic a little bit
> around, without any major modifications.
>
> george.
>
> Index: configure.m4
> ===================================================================
> --- configure.m4 (revision 17970)
> +++ configure.m4 (working copy)
> @@ -40,14 +40,12 @@
> [timer_linux_happy="yes"],
> [timer_linux_happy="no"])])
>
> - AS_IF([test "$timer_linux_happy" = "yes"],
> - [AS_IF([test -r "/proc/cpuinfo"],
> - [timer_linux_happy="yes"],
> - [timer_linux_happy="no"])])
> -
> case "${host}" in
> i?86-*|x86_64*|ia64-*|powerpc-*|powerpc64-*|sparc*-*)
> - timer_linux_happy="yes"
> + AS_IF([test "$timer_linux_happy" = "yes"],
> + [AS_IF([test -r "/proc/cpuinfo"],
> + [timer_linux_happy="yes"],
> + [timer_linux_happy="no"])])
> ;;
> *)
> timer_linux_happy="no"
>
>
>
> On Mar 25, 2008, at 10:31 PM, Brian Barrett wrote:
>> On Mar 25, 2008, at 6:16 PM, Jeff Squyres wrote:
>>> "linux" is the name of the component. It looks like opal/mca/timer/
>>> linux/timer_linux_component.c is doing some checks during component
>>> open() and returning an error if it can't be used (e.g,. if it's not
>>> on linux).
>>>
>>> The timer components are a little different than normal MCA
>>> frameworks; they *must* be compiled in libopen-pal statically, and
>>> there will only be one of them built.
>>>
>>> In this case, I'm guessing that linux was built simply because nothing
>>> else was selected to be built, but then its component_open() function
>>> failed because it didn't find /proc/cpuinfo.
>>
>>
>> This is actually incorrect. The linux component looks for /proc/
>> cpuinfo and builds if it founds that file. There's a base component
>> that's built if nothing else is found. The configure logic for the
>> linux component is probably not the right thing to do -- it should
>> probably be modified to check both for that file (there are systems
>> that call themselves "linux" but don't have a /proc/cpuinfo) is
>> readable and that we're actually on Linux.
>>
>> Brian
>>
>> --
>> Brian Barrett
>>
>> There is an art . . . to flying. The knack lies in learning how to
>> throw yourself at the ground and miss.
>> Douglas Adams, 'The Hitchhikers Guide to the Galaxy'
>>
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>