Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Devel mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-09-25 10:25:08


On Sep 25, 2007, at 10:15 AM, Ethan Mallove wrote:

> How about we first go with Plan C: uname (if it's
> available).
>
> platform_type = &shell("uname -p")
> platform_hardware = &shell("uname -m")
> os_name = &shell("uname -s")
> os_version = &shell("uname -v")

Hmm. Not bad, but it still is a bit odd. Here's what I get:

OSX/macbook pro (intel chip):
-----------------------------
uname -p: i386
uname -m: i386
uname -s: Darwin
uname -v: Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007;
root:xnu-792.22.5~1/RELEASE_I386

whatami -t: darwin-macosx_10.4-ia32
whatami -m: ia32
whatami -n: Darwin
whatami -r: Darwin 8.10.1

Linux/RHEL4u4 (64 bit xeon):
--------------
uname -p: x86_64
uname -m: x86_64
uname -s: Linux
uname -v: #1 SMP Wed Jul 12 23:32:02 EDT 2006

whatami -t: linux-rhel4-x86_64
whatami -m: x86_64
whatami -n: Linux
whatami -r: Linux 2.6.9-42.ELsmp

What do you get on your Solaris platforms?

It looks like both of them will have slight inaccuracies / not-
entirely-clear values (e.g., uname -p and -m seem to return the same
values, but I don't know why whatami returns "ia32" for the MacBook
Pro, nor do I know how "Darwin 8.10.1" maps to "OS X 10.4.10").

> Otherwise default to "unknown".
>
> So the we go down this list:
>
> 1. User-specified in INI
> 2. whatami
> 3. uname
> 4. "unknown"

This sounds reasonable to me. I'll implement it.

-- 
Jeff Squyres
Cisco Systems