Bug 17122 - mclapply drops warnings when options(warn=0)
Summary: mclapply drops warnings when options(warn=0)
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R-devel (trunk)
Hardware: All Linux
: P5 major
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-07-20 19:56 UTC by Bill Denney
Modified: 2017-02-21 22:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Denney 2016-07-20 19:56:58 UTC
As found in the PKNCA package and in this StackOverflow question [1], mclapply will drop warnings if they are not set to immediate (options(warn=1)) or an error (options(warn=2)).

The simplest test case is given on StackOverflow and reproduced here:

library(parallel) 
options(warn=0)
mclapply(1:3, function(x) warning(x))
# No warnings

options(warn=1)
mclapply(1:3, function(x) warning(x))
# 3 warnings

[1] http://stackoverflow.com/questions/21486658/warnings-suppressed-with-mclapply-in-r
Comment 1 Bill Denney 2017-02-21 22:56:57 UTC
Updated as the bug is also confirmed in the latest released version of R.