Running Parallel R 1.8

From Research IT

Jump to: navigation, search

1. Create a file called hostfile and enter the following text into this file

halhead.rit.albany.edu cpu=4
hal01.rit.albany.edu cpu=8
hal02.rit.albany.edu cpu=8
hal03.rit.albany.edu cpu=8
hal04.rit.albany.edu cpu=8
hal05.rit.albany.edu cpu=8
hal06.rit.albany.edu cpu=8
hal07.rit.albany.edu cpu=8
hal08.rit.albany.edu cpu=8

2. Start Lam-mpi: lamboot hostfile

3. To start parallel R enter: /opt/devel/POWER/R/pR/bin/R

4. StartPE(4) - where n is the number of worker threads

Parallel R should now be running

Examples:
# If you have MPI running
StartPE(2)
x = matrix(rnorm(128 * 128), 128, 128)
PE( a <- svd(x) )
PE( b <- solve(x) )
PE( y <- b %*% a$u )
POBJ( y )
str(y)
StopPE()
Personal tools