[R-sig-ME] Failure to load lme4 on Mac
Ken Knoblauch
ken.knoblauch at inserm.fr
Fri Jul 16 15:51:23 CEST 2010
Simon Urbanek <simon.urbanek at ...> writes:
> On Jul 15, 2010, at 7:54 PM, Douglas Bates wrote:
>
> > On Thu, Jul 15, 2010 at 6:47 PM, Daniel Myall
> <daniel.lists at ...> wrote:
> >> I've attempted to reproduce the error seen on the CRAN on several
Mac OS X
> >> machines and haven't been able to. I'm able to build the CRAN
lme4 version
> >> and the svn versions of lme4 and lme4a without issues.
> >
> >> There is obviously an interaction with lme4 and the version of
xcode
> >> installed on the CRAN Mac OS build machine that is resulting in the
test
> >> failure. Is there a page that details the setup of the Mac OS X CRAN
build
> >> machine?
> >
> >> I'm happy to determine what is going on and attempt to resolve this
(it will
> >> mean I don't have to custom compile lme4 for users all the time).
> >
> > Thank you Daniel. Simon Urbanek is the person who coordinates the
> > Mac OS X builds so it might be best if you could share your
> > experiences on successful building with him and perhaps determine
why
> > the CRAN builds are encountering the error. I think it unlikely that
> > it would be due to an out-of-date Xcode compiler set as usually
Simon
> > is one of the people working with the most recent tools.
> >
>
> The CRAN machine is Mac OS X 10.5.8 with Xcode 3.1.4 (using
gcc-4.2)
which is
indeed the latest
Xcode version
> for Leopard. If you have any hints as of why lme4 may be failing they
are
highly appreciated.
>
> Thanks,
> Simon
>
> > I believe that Simon, who I have cc'd on this response, may be on
> > vacation or otherwise away from his email this week. I suggest that
> > you pursue the issue with him off-list when he is available again.
> >
> >>
> >> Daniel
> >>
> >>
> >> On 16/07/10 10:13 AM, Douglas Bates wrote:
> >>>>>
> >>>>> Neither Martin nor I use Mac OS and we can't reproduce the
problem on
> >>>>> other operating systems so we are kind of stuck.
> >>>>>
> >>>>> Apparently it is a matter of one of the tests failing but without
> >>>>> access to a system that exhibits the failure I wouldn't know
where to
> >>>>> start debugging. Is some kind person using Mac OS were to
download
> >>>>> and test the package and provide some details about the
nature of the
> >>>>> failure we might be able to get started.
> >>>>>
Just having updated Xcode to 3.1.4 and fixed the versions of gcc, etc. so
that I'm able to install latest version of Rcpp and lme4a without any
problems,
I'll take a bite, but maybe I'm just repeating what you have already seen.
I can install lme4 from source from Rforge with no problem.
Just for starters here is my sessionInfo
R version 2.11.1 Patched (2010-07-15 r52539)
i386-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] lme4_0.999375-34 Matrix_0.999375-41 lattice_0.18-8
loaded via a namespace (and not attached):
[1] grid_2.11.1 nlme_3.1-96 stats4_2.11.1
I dowloaded lme4_0.999375-34.tar.gz from CRAN and ran
R CMD check on it and came up with
* checking tests ...
Running ‘extras.R’
Running ‘lmer-1.R’
ERROR
Running the tests in 'tests/lmer-1.R' failed.
Last 13 lines of output:
+ x3=rnorm(20,1))
> m0 <- lmer(y ~ (x1 + x2)|ff, data = D)
> m1 <- lmer(y ~ x1 + x2|ff , data = D)
> m2 <- lmer(y ~ x1 + (x2|ff), data = D)
> m3 <- lmer(y ~ (x2|ff) + x1, data = D)
> stopifnot(identical(ranef(m0), ranef(m1)),
+ identical(ranef(m2), ranef(m3)),
+ inherits(tryCatch(lmer(y ~ x2|ff + x1, data = D), error = function(e)e),
+ "error"))
Error: identical(ranef(m0), ranef(m1)) is not TRUE
In addition: Warning message:
In Ops.factor(ff, x1) : + not meaningful for factors
Execution halted
which I think is the reported problem.
I went into the file lmer-1.R which seems to be where this is
coming from and sourced the lines indicated above and get
> D <- data.frame(y= rnorm(20,10), ff = gl(4,5),
+ x1=rnorm(20,3), x2=rnorm(20,7),
+ x3=rnorm(20,1))
> m0 <- lmer(y ~ (x1 + x2)|ff, data = D)
> m1 <- lmer(y ~ x1 + x2|ff , data = D)
> m2 <- lmer(y ~ x1 + (x2|ff), data = D)
> m3 <- lmer(y ~ (x2|ff) + x1, data = D)
> stopifnot(identical(ranef(m0), ranef(m1)),
+ identical(ranef(m2), ranef(m3)),
+ inherits(tryCatch(lmer(y ~ x2|ff + x1, data = D), error =
function(e)e),
+ "error"))
Error: identical(ranef(m2), ranef(m3)) is not TRUE
In addition: Warning message:
In Ops.factor(ff, x1) : + not meaningful for factors
> identical(ranef(m0), ranef(m1))
[1] TRUE
> identical(ranef(m2), ranef(m3))
[1] FALSE
so it happens in an R session as well.
Checking the ranef's
> ranef(m2)
$ff
(Intercept) x2
1 -1.4142222 0.15618464
2 0.4787662 -0.05287424
3 0.3193410 -0.03526755
4 1.7224362 -0.19022335
> ranef(m3)
$ff
(Intercept) x2
1 -1.4141930 0.15618142
2 0.4787944 -0.05287736
3 0.3193632 -0.03527000
4 1.7224652 -0.19022656
They do indeed differ. I'm on a 32 bit machine, could this be
a 32/64 bit difference or something at the level of BLAS/ATLAS level?
That's out of my league. If I have time, I'll try it on a 64 bit Mac, but I'm
not likely to get back to that before about the beginning of August.
Hope that this is useful.
Ken
--
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html
More information about the R-sig-mixed-models
mailing list