Hi  HPC People:

I have been running an R script on a cluster successfully.

Now I'm trying to run the same script on a quad core laptop and am getting an error.  Here is the output:

erin@ubuntu:~$ mpirun -np 1 R CMD BATCH ar3.R e1.out

--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 2090 on
node ubuntu exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
erin@ubuntu:~$ cat Machines
localhost cpu=4

erin@ubuntu:~$ cat ar3.R
library(doMPI)
cl <- startMPIcluster()
registerDoMPI(cl)
n <- 10000
phi1 <- (0.1)
opts <- list(chunkSize=100)
j1 <- 0
set.seed(521)
zz <- foreach(i=1:n,.combine=rbind,.options.mpi=opts) %dopar% {
u <- arima.sim(list(order=c(1,0,0),ar=phi1),360)
 x <- ts(u,start=1975,freq=12)
 y <- aggregate(x,nfreq=4,sum)
 gg <- try(arima(y,order=c(1,0,0)),silent=TRUE)
if(!inherits(gg, "try-error")) {
 c(gg$model$phi,gg$sigma2)
	}
 }
	cat("dim",dim(zz),"\n")
	j1 <- nrow(zz)
     print(list(mean=mean(zz[,1]),sd=sd(zz[,1])/sqrt(j1),
	sig=mean(zz[,2]),sds=sd(zz[,2])/sqrt(j1)))


     closeCluster(cl)

     
erin@ubuntu:~$ cat e1.out

R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> library(doMPI)
Loading required package: foreach
Loading required package: iterators
Loading required package: codetools
Loading required package: Rmpi
> cl <- startMPIcluster()
	2 slaves are spawned successfully. 0 failed.
> registerDoMPI(cl)
> n <- 10000
> phi1 <- (0.1)
> opts <- list(chunkSize=100)
> j1 <- 0
> set.seed(521)
> zz <- foreach(i=1:n,.combine=rbind,.options.mpi=opts) %dopar% {
+ u <- arima.sim(list(order=c(1,0,0),ar=phi1),360)
+  x <- ts(u,start=1975,freq=12)
+  y <- aggregate(x,nfreq=4,sum)
+  gg <- try(arima(y,order=c(1,0,0)),silent=TRUE)
+ if(!inherits(gg, "try-error")) {
+  c(gg$model$phi,gg$sigma2)
+ 	}
+  }
> 	cat("dim",dim(zz),"\n")
dim 10000 2 
> 	j1 <- nrow(zz)
>      print(list(mean=mean(zz[,1]),sd=sd(zz[,1])/sqrt(j1),
+ 	sig=mean(zz[,2]),sds=sd(zz[,2])/sqrt(j1)))
$mean
[1] 0.02640818

$sd
[1] 0.0009076874

$sig
[1] 3.39931

$sds
[1] 0.004377713

> 
> 
>      closeCluster(cl)
> 
>      
> 
> proc.time()
   user  system elapsed 
 19.840  57.190  77.464 
erin@ubuntu:~$ 

The results are correct, but the error is somewhat disconcerting.  Any help would be much appreciated.

Thanks,
Erin


Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse@uhd.edu


	[[alternative HTML version deleted]]

