[R-sig-hpc] Help installing sprng libraries

David Marra david.marra at me.com
Thu Dec 11 15:57:58 CET 2008


Stefan/Everyone,

This is helpful. Using the code you provided I am able to install  
rsprng for 32 bit Leopard, but still leaves open how to achieve this  
for 64-bit.

Is anyone aware of whether the Linux 64-bit sprng on Na Li's website  
will work with Leopard or alternatively where one can download a 64- 
bit sprng for Leopard?

many thanks,
David


On Dec 11, 2008, at 11:39 PM, Stefan Theussl wrote:

> David Marra wrote:
>> Hi Stefan/Everyone,
>>
>> Thank you for the suggestion. I am getting the following message now:
>>
>> Warning message:
>> package ‘rsprng’ is not available
> Yes, I see. I'm not a Mac OS X expert, I only use it from time to  
> time within my R-Forge work.
>
> Anyway, there are two more things I forgot:
>
> 1) You need of course the right sprng library for your architecture.  
> As far as I understood you'd like to run code on 64 bit R, then you  
> need of course to get the 64 bit sprng from Na Li's website (this  
> was not the case as far as I see from your initial mail).
>
> 2) Mac OS X has a binary package repository (the default) where  
> rsprng is obviously not available.
> That means you have to install rsprng via
>
> install.packages("rsprng", configure.args="LD_FLAGS=\"-lgmp\" --with- 
> sprng=/pathto/lib/sprng", type="source")
>
> the latter argument indicates that you want to access the source  
> part of CRAN (the package tarballs).
>
> This works for me (at least when using 32 bit R and sprng on  
> Leopard) but introduces a new problem:
>
> > install.packages("rsprng", configure.args="LD_FLAGS=\"-lgmp\" -- 
> with-sprng=/Users/theussl/lib/sprng", type="source")
> trying URL 'http://cran.at.r-project.org/src/contrib/ 
> rsprng_0.4.tar.gz'
> Content type 'application/x-gzip' length 36435 bytes (35 Kb)
> opened URL
> ==================================================
> downloaded 35 Kb
>
> * Installing *source* package 'rsprng' ...
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> Try to find sprng.h ...
> Found in /Users/theussl/lib/sprng/include
> Try to find libsprng.a ...
> Found in /Users/theussl/lib/sprng/lib
> Try to find libgmp.a if we need it ...
> checking for main in -lgmp... no
> libgmp not found. exiting...
> ERROR: configuration failed for package 'rsprng'
> ** Removing '/Library/Frameworks/R.framework/Resources/library/rsprng'
>
> The downloaded packages are in
>       /private/tmp/RtmpmMmU4y/downloaded_packages
> Updating HTML index of packages in '.Library'
> Warning message:
> In install.packages("rsprng", configure.args = "LD_FLAGS=\"-lgmp\" -- 
> with-sprng=/Users/theussl/lib/sprng",  :
> installation of package 'rsprng' had non-zero exit status
>
> But this is the point where my knowledge ends. I don't know if the  
> GMP library is somewhere available in binary form. In the worst case  
> you have to compile it yourself.
>
> Best,
> Stefan
>>
>> Any thoughts?
>>
>> David
>>
>> On Dec 11, 2008, at 10:50 PM, Stefan Theussl wrote:
>>
>>> Hi David,
>>>
>>> it seems to me that your unpacked sprng library and header files  
>>> are not in a standard path. If so, you can install rsprng directly  
>>> from R using
>>> install.packages("rsprng", configure.args = "--with-sprng=/path/to/ 
>>> your/unpacked/sprng")
>>>
>>> Best,
>>> Stefan
>>>
>>> David Marra wrote:
>>>> Dear All,
>>>>
>>>> I need help installing sprng libraries to enable use of rspring  
>>>> and  Rmpi packages. The machine is a Mac Pro 8 core machine  
>>>> running OS X  10.5.5 Leopard and 64-bit R.
>>>>
>>>> So far, I have downloaded a SPRNG binary file, sprng-2.0a-i386-  
>>>> darwin.tar.bz2, from Na Li's website:http://www.biostat.umn.edu/~nali/SoftwareListing.html 
>>>>  .
>>>>
>>>> In Terminal I did two commands:
>>>> > bunzip2 spr*
>>>> > tar -xvf spr*
>>>> which produced the following output:
>>>> include/sprng.h
>>>> include/sprng_f.h
>>>> include/interface.h
>>>> lib/libsprng.a
>>>>
>>>> In the R 64-bit GUI I attempted an installation or rsprng from  
>>>> CRAN  sources which resulted in failure (full output below),  
>>>> namely:
>>>> Cannot find sprng 2.0 header file.
>>>>
>>>> What am I doing wrong and how can I install these libraries?
>>>> (Terminal code much appreciated!)
>>>>
>>>> Thanks in advance,
>>>> David
>>>>
>>>>    [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> R-sig-hpc mailing list
>>>> R-sig-hpc at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>>>>
>>>
>>
>



More information about the R-sig-hpc mailing list