[R] install R package on Unix cluster

Rainer M Krug r.m.krug at gmail.com
Mon Mar 19 09:41:09 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/03/12 14:40, Uwe Ligges wrote:
> 
> 
> On 18.03.2012 05:47, Lorenzo Cattarino wrote:
>> Hi R users,
>> 
>> Working from a PC, I am trying to install the spatstat package on a Unix cluster. I created 
>> the following PBS file to send a job array:
>> 
>> #!/bin/bash -ue
>> 
>> #PBS -m ae #PBS -M my email #PBS -J 1-45 #PBS -A my username #PBS -N job name #PBS -l 
>> resources #PBS -l walltime
>> 
>> cd $PBS_O_WORKDIR
>> 
>> module load R/2.14.1
>> 
>> R CMD INSTALL -l /path/to/library spatstat
> 
> This command installs *a* source package from the current subdirectory spatstat.
> 
> If there is no such directory containing the sources, it won't work. Either provide the
> gzipped tarball and give its name or use install.packages("spatstat") within an R script.
> 
> It makes sense to install it outside the parallel processing into a common directory and just 
> use it in parallel

I can second that. My approach to install the package in my home directory which is then
accessible from all nodes.

If you are the admin of the cluster, you can install the package in the normal location and share
this location so that it is accessible to all nodes.

Cheers,

Rainer


> (It is not entirely clear to me if you are really running the installation on all nodes).
> 
> Uwe Ligges
> 
> 
> 
>> 
>> R CMD BATCH /path/to/folder/Script_$PBS_ARRAY_INDEX.R
>> 
>> Obviosuly I failed to understand pag 19 of the R admin manual because I keep getting the 
>> following error message:
>> 
>> Warning: invalid package ‘spatstat’ Error: ERROR: no packages specified
>> 
>> I'd appreciate if you can point me in the right direction
>> 
>> Thanks Lorenzo
>> 
>> 
>> [[alternative HTML version deleted]]
>> 
>> 
>> 
>> 
>> ______________________________________________ R-help at r-project.org mailing list 
>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, 
>> reproducible code.
> 
> ______________________________________________ R-help at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, 
> reproducible code.


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9m8SUACgkQoYgNqgF2egpLvACfbtskR/1VxaiGqs3ErCRV+gVS
Q80An2WsyZ51VhmfvcpEpn8x2Zy/mexB
=M+ME
-----END PGP SIGNATURE-----



More information about the R-help mailing list