Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Build mca_sysinfo_linux module when /proc/cpuinfo doesn't exist
From: Ralph Castain (rhc_at_[hidden])
Date: 2011-03-24 22:01:48


Thanks Paul - very illuminating!

Looks to me like I'm okay for OpenBSD as I won't find /proc and so won't build the Linux module.

I have a problem with FreeBSD because /proc exists, but I won't find what I'm looking for, so I'll have to add a test for that case and not-build when FreeBSD is detected.

The "not-mounted" case for NetBSD is more problematic. For now, I think I'll just use the safe method and not-build if NetBSD is detected.

Remember, folks - this is -not- system critical to running OMPI. At the moment, the info isn't really even used for an MPI job. In the future this will change, and so the build logic will become more important - but in that future, the "sysinfo" framework disappears and is merged with other functionality that already knows how to resolve this.

So all we're trying to do here is help fill a temporary gap :-)

On Mar 24, 2011, at 7:52 PM, Paul H. Hargrove wrote:

> Silas,
>
> FYI: openmpi-1.4.1 is in the package repo for NetBSD 5.1. So, you might not need to build from scratch at all, depending on your desired use.
>
> Jeff,
>
> When available (remember that unlike Linux /proc might not be mounted by default) the /proc/cpuinfo and /proc/meminfo on NetBSD 5.1 are (nearly?) identical to the Linux ones. See below for an example.
>
> To "prefetch" the next logical question:
> On a FreeBSD 8.1 system I find that /proc exists but does not contain cpuinfo or meminfo
> On a OpenBSD 4.8 system I find that there is no /proc
>
> -Paul
>
> -bash-4.1$ uname -a
> NetBSD netbsd5-amd64.xen 5.1 NetBSD 5.1 (XEN3_DOMU) #0: Sat Nov 6 13:17:16 UTC 2010 builds_at_[hidden]:/home/builds/ab/netbsd-5-1-RELEASE/amd64/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/amd64/compile/XEN3_DOMU amd64
> -bash-4.1$ cat /proc/cpuinfo
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 7
> model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
> stepping : 6
> cpu MHz : 2333.42
> fdiv_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 10
> wp : no
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall mmxext fxsr_opt rdtscp lm 3dnow recovery longrun lrti cxmmx cyrix_arr centaur_mcr constant_tsc pni monitor ds_cpi vmx est tm2 cx16
>
> -bash-4.1$ cat /proc/meminfo
> total: used: free: shared: buffers: cached:
> Mem: 1031933952 796835840 235098112 0 542756864 555749376
> Swap: 134213632 0 134213632
> MemTotal: 1007748 kB
> MemFree: 229588 kB
> MemShared: 0 kB
> Buffers: 530036 kB
> Cached: 542724 kB
> SwapTotal: 131068 kB
> SwapFree: 131068 kB
>
>
> On 3/24/2011 6:07 PM, Jeff Squyres wrote:
>> Is the data the same in /proc between NetBSD and Linux?
>>
>> We're currently looking in /proc/cpuinfo and /proc/meminfo for some specific key / data pairs.
>>
>>
>>
>> On Mar 24, 2011, at 2:29 PM, Silas Silva wrote:
>>
>>> Hello there,
>>>
>>> I'm using OpenMPI for educational reasons. It works pretty fine under
>>> GNU/Linux. I have both compiled it and downloaded it from the package
>>> management system with no problems.
>>>
>>> But I have trying to use it in other Unix systems as well. In these
>>> systems /proc (NetBSD for instance) is by default unmounted, so
>>> ./configure script cannot stat /proc/cpuinfo (although it does exist in
>>> NetBSD if you manually mount /proc). In the case it cannot stat
>>> /proc/cpuinfo, it just silently ignores compilation of
>>> mca_sysinfo_linux.{so,la}.
>>>
>>> Is this behaviour correct? Or it would be be a better idea that
>>> configure script fail with a "please check /proc/cpuinfo or specify
>>> --dont-build-sysinfo-linux"-like message?
>>>
>>> Thank you very much.
>>>
>>> --
>>> Silas Silva
>>> _______________________________________________
>>> devel mailing list
>>> devel_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>
>
> --
> Paul H. Hargrove PHHargrove_at_[hidden]
> Future Technologies Group
> HPC Research Department Tel: +1-510-495-2352
> Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel