[Rd] Incorrect behavior in 64-bit version (PR#11034)
ripley at stats.ox.ac.uk
ripley at stats.ox.ac.uk
Wed Mar 26 00:20:14 CET 2008
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--27495890-661127544-1206487153=:18251
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
Yes, R has been built in 64-bit mode on amd64 Solaris 10 (and it is not
going to work on x86, is it?). As far as I can see I used the SunStudio
11 compilers (which the box shipped with: there is also SunStudio 12 on
there) with
blackhawk% cat config.site
CC="cc -xc99 -xarch=amd64"
CFLAGS=-'O -xlibmieee'
F77="f95 -xarch=amd64"
FFLAGS=-O4
...
> m <- matrix(ncol=2, 1:6)
> log10(m)
[,1] [,2]
[1,] 0.0000000 0.6020600
[2,] 0.3010300 0.6989700
[3,] 0.4771213 0.7781513
(It's a pretty bare build, without either readline or GNU iconv.)
blackhawk% cc -V
cc: Sun C 5.8 Patch 121016-07 2007/10/03
blackhawk% f95 -V
f95: Sun Fortran 95 8.2 Patch 121020-08 2008/02/05
I suppose we are just supposed to know that '5.8' and '8.2' mean 11.
As I recall there was a good reason why I reduced the optimization level
-- I used -xO5 and -O5 on Sparc Solaris and the SunStudio x86_64 Linux
compilers so I suspect that something did not work at those levels.
On Tue, 25 Mar 2008, Peter Dalgaard wrote:
> lodewijk.bonebakker at sun.com wrote:
>> Full_Name: Lodewijk Bonebakker
>> Version: v2.6.2
>> OS: Solaris, x86, snv_80
>> Submission from: (NULL) (192.18.43.225)
>>
>>
>> when I build R in 32-bit mode on my 64-bit OS, R works as expected:
>>
>> R version 2.6.2 (2008-02-08)
>> ...
>> Type 'q()' to quit R.
>>
>>
>>> m <- matrix(ncol=2,c(1:6))
>>>
>>> m
>>>
>> [,1] [,2]
>> [1,] 1 4
>> [2,] 2 5
>> [3,] 3 6
>>
>>> n <- log10(m)
>>> n
>>>
>> [,1] [,2]
>> [1,] 0.0000000 0.6020600
>> [2,] 0.3010300 0.6989700
>> [3,] 0.4771213 0.7781513
>>
>>
>>
>> On a 64-bit build, uisng *only* the "-m64" to instruct the sun compilers to
>> generate a 64 bit binary, the following happens (there are no compilation
>> errors)
>>
>>
>> R version 2.6.2 (2008-02-08)
>> ...
>> Type 'q()' to quit R.
>>
>>
>>> m <- matrix(ncol=2,c(1:6))
>>> m
>>>
>> [,1] [,2]
>> [1,] 1 4
>> [2,] 2 5
>> [3,] 3 6
>>
>>> n <- log10(m)
>>>
>> Warning message:
>> In log(1:6, 10) : NaNs produced
>>
>>> n
>>>
>> [,1] [,2]
>> [1,] 0.1428914 0
>> [2,] -1.1834403 0
>> [3,] NaN 0
>>
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
> There is not sufficient information to go on here (with a sun.com
> address you could be expected to know better). R works fine as a 64 bit
> program on several platforms, as far as I know including Solaris, so the
> issue has to be specific to your compiler and library setup.
>
> This has all the hallmarks of a math header file error (either args or
> return value declared of the wrong type), or a linker issue (log not
> really log). I surely hope it fails "make check"!
>
> So, exactly what did you do, which compiler and build tools and which
> version?
> Did you read the http://cran.r-project.org/doc/manuals/R-admin.html,
> including Appendix C?
> (Please keep R-bugs in the recipient list. I'm not the resident expert.)
>
> --
> O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
>
> ______________________________________________
> 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
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
--27495890-661127544-1206487153=:18251--
More information about the R-devel
mailing list