[R-sig-hpc] unusal error when switching to a quad core

Stephen Weston stephen.b.weston at gmail.com
Wed Feb 24 15:26:57 CET 2010


Hi Erin,

In my examples, I use the mpi.quit command to get rid of this
error message.  You can also use mpi.finalize, but if you're
doing it at the end of your script, you might as well use mpi.quit.

I've noticed that this message isn't always issued.  I'm
not sure why that is, but I believe it's safe to always use it
to shutdown your mpi program.

- Steve


On Mon, Feb 22, 2010 at 8:48 PM, Hodgess, Erin <HodgessE at uhd.edu> wrote:
> 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 at 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 at ubuntu:~$ cat Machines
> localhost cpu=4
>
> erin at 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 at 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 at 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 at uhd.edu
>
>
>        [[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