[R] Rmpi fails to install

rose at rz.uni-potsdam.de rose at rz.uni-potsdam.de
Sun Jul 3 18:19:24 CEST 2011


Quoting rose at rz.uni-potsdam.de:

> Quoting Juergen Rose <rose at rz.uni-potsdam.de>:
>
>> Hi,
>>
>> I was just able to install the patched Rmpi on the second system with
>> openmpi-1.5.3. What can we that Rmpi_0.5-9a.tar.gz becomes a standard
>> CRAN package?
>>
>> Regards Juergen
>>
>
> Now there is a new problem. Testing openmpi-1.5.3-r1 and
> Rmpi_0.5-9a.tar.gz with the attached R script I got a Segmentation
> fault or the program hangs in the vicinity of closeCluster() and
> mpi.quit(), which does not happen with openmpi-1.4.3 and
> Rmpi_0.5-9.tar.gz:

I forget to attach the R script. Now it should be attached.


-------------- next part --------------
#######################################################
##                               j.r.    02-Jul-11   ##
#######################################################

suppressPackageStartupMessages(library('doMPI', quiet=TRUE))
suppressPackageStartupMessages(library('foreach', quiet=TRUE))

# create and register a doMPI cluster if necessary
if (!identical(getDoParName(), 'doMPI')) {
  cl <- startMPIcluster()
  registerDoMPI(cl)
}

#logfile="mpi_test_parallel_mini.log"
#sink(file=logfile,split=TRUE)
Date <- system("date",intern=TRUE)

Ncyc <- 4
resVec <- numeric(Ncyc)
pto.T <- proc.time()

pRes <- foreach(i = 1:Ncyc) %dopar% {
  pto <- proc.time()
  ptn <- proc.time();  dt <- ptn - pto;  ut <- dt[1];    st <- dt[2];    et <- dt[3]

  res <- i*i
  list(Res=res, Ut=ut, St=st, Et=et)
}

for (i in 1:Ncyc) {
  resVec[i] <- pRes[[i]]$Res
  print(sprintf("Res=%5.3f   usrtime=%6.1f  elatime=%6.1f",pRes[[i]]$Res,pRes[[i]]$Ut,pRes[[i]]$Et))
}
ptn.T <- proc.time();  dt <- ptn.T - pto.T;  ut <- dt[1];    st <- dt[2];    et <- dt[3]
meanRes<-mean(resVec)
print(sprintf("    Res=%5.3f    userTime=%5.1f  elapTime=%5.1f",meanRes,ut,et))

#sink()
print("before closeCluster()")

closeCluster(cl)
print("after closeCluster()")

mpi.quit()


More information about the R-help mailing list