From ripley at stats.ox.ac.uk  Sat Aug 23 08:01:13 2014
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat, 23 Aug 2014 07:01:13 +0100 (BST)
Subject: [Rd] parallel::detectCores(TRUE) gives: Error in system(cmd,
 TRUE) : error in running command
In-Reply-To: <CAM3-Kjb-E2U=SaTigq7D-SBhG_ox=R8o-c9ZgwqpvspKweOEEw@mail.gmail.com>
References: <CAM3-KjZ2OtUx6Hz88WuM4A4AV8_OAey4MvWjz8ZKMRDQi=jgdQ@mail.gmail.com>
	<51eca682339a4cb5b14cc327e37ff02a@CONNHUB4.connect.uwaterloo.ca>
	<CAM3-Kjb-E2U=SaTigq7D-SBhG_ox=R8o-c9ZgwqpvspKweOEEw@mail.gmail.com>
Message-ID: <alpine.LFD.2.11.1408230656290.4032@gannet.stats.ox.ac.uk>

But parallel::detectCores(TRUE) is a call of desparation: this ran 
code intended for FreeBSD.

If all else fails read the help:

      It has methods to do so for Linux, OS X, FreeBSD, Solaris, Irix
      and Windows.  ?detectCores(TRUE)? could be tried on other
      Unix-alike systems.


On Fri, 22 Aug 2014, Marius Hofert wrote:

> Thanks, Bill. The output is:
>
>> trace(system, quote(print(command)))
>  parallel::detectCores(TRUE)
> Tracing function "system" in package "base"
> [1] "system"
>>
> Tracing system(cmd, TRUE) on entry
> [1] "/usr/sbin/sysctl -n hw.ncpu 2>/dev/null"
> Error in system(cmd, TRUE) : error in running command
>>
>
> On Fri, Aug 22, 2014 at 6:13 PM, William Dunlap <wdunlap at tibco.com> wrote:
>> The same is true in R-2.14.1 on  Ubuntu 12.04.4 LTS .  Put a trace on
>> system with
>>   trace(system, quote(print(command)))
>>   parallel::detectCores(TRUE)
>> and you will see the offending shell command.
>> Bill Dunlap
>> TIBCO Software
>> wdunlap tibco.com
>>
>>
>> On Fri, Aug 22, 2014 at 1:03 PM, Marius Hofert
>> <marius.hofert at uwaterloo.ca> wrote:
>>> Hi,
>>>
>>> Both under the current R-devel (r66456) and a version from about 3
>>> months ago, I experience the following behavior:
>>>
>>>> parallel::detectCores(TRUE)
>>> Error in system(cmd, TRUE) : error in running command
>>>> traceback()
>>> 3: system(cmd, TRUE)
>>> 2: gsub("^ +", "", system(cmd, TRUE)[1])
>>> 1: parallel::detectCores(TRUE)
>>>>
>>>
>>> This is on Ubuntu 14.04. Does anybody else see this? [I currently have
>>> quite a heavy workload, otherwise I would have installed and tested it
>>> also under 3.1.1]
>>>
>>> Cheers,
>>>
>>> Marius
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK


[Rd] parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command
Prof Brian Ripley