From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p828J1Wn016284 for ; Fri, 2 Sep 2011 10:19:05 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYAAFmQYE5RZ90wkWdsb2JhbABCqFkUAQEBAQkLCwcUAyOBRgEBAQEDJ2ICAQgYCiQyJQIEG4dst0KGBWAEhzqLcpEM X-IronPort-AV: E=Sophos;i="4.68,317,1312149600"; d="scan'208";a="118094590" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail1-smtp-roc.national.inria.fr with ESMTP; 02 Sep 2011 10:19:05 +0200 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110902081904.WTRO17426.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Fri, 2 Sep 2011 09:19:04 +0100 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110902081904.BCFG24017.aamtaout03-winn.ispmail.ntl.com@romulus.metastack.com> for ; Fri, 2 Sep 2011 09:19:04 +0100 Received: from remus.metastack.local ([172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id p828J1Ye028491 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Fri, 2 Sep 2011 09:19:01 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.01.0289.001; Fri, 2 Sep 2011 09:19:01 +0100 From: David Allsopp To: "caml-list@inria.fr" Thread-Topic: [Caml-list] Cross-platform cpu count Thread-Index: AQHMaQQCqL9GVMyRy0ygM7NDJZwvBJU5p1AAgAAYccA= Date: Fri, 2 Sep 2011 08:19:00 +0000 Message-ID: References: <20110902075100.GA4949@annexia.org> In-Reply-To: <20110902075100.GA4949@annexia.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.7] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=40hZHaDki8MA:10 a=AdGk3VER0UgA:10 a=cTs9vV391PwA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=UbHXYAfL9e-Z8xLA8jgA:9 a=wPNLvfGTeEIA:10 a=Dl-6btD3roy4sBAI:21 a=Ko3P23f0bCuf9nwm:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p828J1Wn016284 Subject: RE: [Caml-list] Cross-platform cpu count Richard W.M. Jones wrote: > On Fri, Sep 02, 2011 at 02:04:51AM +0200, Daniel Bünzli wrote: > > Hello, > > > > Can anybody confirm me that the following code works on cygwin : > > > > let cpu_count () = > > try match Sys.os_type with > > | "Win32" -> int_of_string (Sys.getenv "NUMBER_OF_PROCESSORS") > > | _ -> > > let i = Unix.open_process_in "getconf _NPROCESSORS_ONLN" in > > Don't know about Cygwin, but it won't work on MinGW. What's your reason? (given that it does work) David