kashenfelter / RScaLAPACK

A seamless interface to perform parallel computation on linear

Home Page:http://www.aspect-sdm.org/Parallel-R/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/*======================================================================
 *           R-ScaLAPACK version 0.6.x:  ScaLAPACK interface to R
 *              Oak Ridge National Laboratory, Oak Ridge TN.
 *        Authors: David Bauer, Guruprasad Kora, Nagiza. F. Samatova, 
 *                            Srikanth Yoginath.
 *     Contact: Nagiza F. Samatova; (865) 241-4351; samatovan@ornl.gov
 *     Contact: Guruprasad Kora; (865) 576-6210; koragh@ornl.gov
 *                 Computer Science and Mathematics Division
 *             Oak Ridge National Laboratory, Oak Ridge TN 37831 
 *                   (C) 2004 All Rights Reserved
 *
 *                              NOTICE
 *
 * Permission to use, copy, modify, and distribute this software and
 * its documentation for any purpose and without fee is hereby granted
 * provided that the above copyright notice appear in all copies and
 * that both the copyright notice and this permission notice appear in
 * supporting documentation.
 *
 * Neither the Oak Ridge National Laboratory nor the Authors make any
 * representations about the suitability of this software for any
 * purpose.  This software is provided ``as is'' without express or
 * implied warranty.
 *
 * RScaLAPACK (http://www.aspect-sdm.org/Parallel-R) was funded
 * as part of the Scientific Data Management Center
 * (http://sdm.lbl.gov/sdmcenter) under the Department of Energy's 
 * Scientific Discovery through Advanced Computing (DOE SciDAC) program
 * (http://www.scidac.org ). 
=========================================================================*/
RScaLAPACK (v0.6.1)

                             -------------------------------
                              I - INSTALLATION Instructions
                             -------------------------------


System requirements:

	GNU – gcc toolchain (4.0.0 or higher) – Standard on most Linux distributions.
	R (R-2.0 or higher)
	OpenMPI (System provided) - /sw/ewok/ompi/1.2.8/sl5.2_gnu4.1.2
	ScaLAPACK (Current version) - http://www.netlib.org/scalapack/scalapack_installer.tgz
	(BLAS, BLACS, LAPACK will be installed as part of ScaLAPACK.)

1. Instructions to install R 
----------------------------

Download http://cran.cnr.berkeley.edu/src/base/R-2/R-2.9.1.tar.gz
	wget http://cran.cnr.berkeley.edu/src/base/R-2/R-2.9.1.tar.gz

Unzip R-2.9.1.tar.gz
	tar zxvf R-2.9.1.tar.gz

Change in to the unzipped directory

Execute 
	./configure --prefix=<path to install>  --enable-R-shlib  
	make
	make install

Add the above <build directory>/lib to your LD_LIBRARY_PATH
export LD_LIBRARY_PATH=<build directory>/lib:$LD_LIBRARY_PATH

Add the above <build directory>/bin to your PATH
export PATH=<build directory>/bin:$PATH

Create R_HOME environment variable.
export R_HOME=<build_directory>

2. Instructions to install OpenMPI
----------------------------------

Download http://www.open-mpi.org/software/ompi/v1.3/downloads/openmpi-1.3.3.tar.gz
	wget http://www.open-mpi.org/software/ompi/v1.3/downloads/openmpi-1.3.3.tar.gz

Unzip openmpi-1.3.3.tar.gz
	tar zxvf openmpi-1.3.3.tar.gz

Change in to the unzipped directory

Execute 
	./configure --prefix=<path to install>  
	make
	make install

Add the above <build directory>/lib to your LD_LIBRARY_PATH
	export LD_LIBRARY_PATH=<build directory>/lib:$LD_LIBRARY_PATH

Add the above <build directory>/bin to your PATH
	export PATH=<build directory>/bin:$PATH


3. Instructions to install ScaLAPACK 
------------------------------------

Download http://www.netlib.org/scalapack/scalapack_installer.tgz
	wget http://www.netlib.org/scalapack/scalapack_installer.tgz

Unzip scalapack_installer.tgz
	tar zxvf scalapack_installer.tgz

Change in to the unziped directory

Execute 
	./setup.py  --prefix=<path to install> --downblas --downblacs --downlapack --f90=gfortran

Add the above <build directory>/lib to your LD_LIBRARY_PATH
	export LD_LIBRARY_PATH=<build directory>/lib:$LD_LIBRARY_PATH

4. Instructions to install RScaLAPACK

Download RScaLAPACK through CRAN
	wget http://cran.cnr.berkeley.edu/src/contrib/RScaLAPACK_0.6.1.tar.gz

	R CMD INSTALL  --configure-args="--with-f77 --with-mpi=<MPI install  home directory> --with-blacs=<scalapack build>/lib  --with-blas=<scalapack build>/lib --with-lapack=<scalapack build>/lib --with-scalapack=<scalapack build>/lib" RScaLAPACK_0.6.1.tar.gz
===========================================================================================================



FAQs
----

1.
	I get the following error when I try to run RScaLAPACK functions on a cluster with OpenMPI.
[system:13400] pls:tm: failed to poll for a spawned proc, return status = 17002
[system:13400] [0,0,0] ORTE_ERROR_LOG: In errno in file rmgr_urm.c at line 462
[system:13400] [0,0,0] ORTE_ERROR_LOG: In errno in file communicator/comm_dyn.c at line 608

o	Try executing R with mpirun, like mpirun –np 1 R --vanilla

2. 
	I get the following error when I exit R after using RScaLAPACK library
(handle_stdin_input 1089): stdin problem; if pgm is run in background, redirect from /dev/null

o	You get this message when you are using MPICH mpi implementation. Try executing R with mpirun, like mpiexec –np 1 R --vanilla

3. I get MPI_Finalize error after exiting R when I use RScaLAPACK library

o	Its a MPICH2 issue. Known bug, waiting for the MPICH team to fix it. In the meantime, please execute "PA.exit()" to gracefully exit RScaLAPACK before you quit R.

=======================================================================================================
CONTACT:
	Write to parallel_r@mailhub.ornl.gov  
========================================================================================================

                             -------------------------
                              II - Usage Instructions
                             -------------------------

Testing RScaLAPACK 
------------------

Start R
	R

Execute 
1. Load the RScaLAPACK library in the R-environment
     library(RScaLAPACK)

2. Prepare data
     rnorm(100)->x
     dim(x)=c(10,10)
     c(1,0*(1:9))->y
     dim(y)=c(10,1)

3. Execute RScaLAPACK's parallel solve routine
     sla.solve(x,y)

4. To find help for a function in R, use

	> ?sla.solve

5. To get to know the details of a package

	> help (package=RScaLAPACK)


DEMO:
----
To invoke the demo scripts, provided along with the package

	> demo (RScaLAPACK)

This will provide you with a list of demo routines provided with this
package. To view the demo, you can call any of the listed function.
For example:

	> slaSolveDemo() 

This command will run the R script demonstrating the usage of "sla.solve" function.
	  

=======================================================================================================
CONTACT:
	Write to parallel_r@mailhub.ornl.gov  
========================================================================================================

About

A seamless interface to perform parallel computation on linear

http://www.aspect-sdm.org/Parallel-R/


Languages

Language:Fortran 40.4%Language:C 36.5%Language:R 21.8%Language:Makefile 0.8%Language:Shell 0.5%