Hi,
 
Thanks in advance.
 
I am Deb, Statistician at NSW Department of Services, Technology &
Administration, Sydney, Australia.
 
I have come across bugsparallel software to run WinBUGS in parallel. 
 
I need your assistance to solve this problem. The computer hangs while
running at bugs.fit <- bugsParallel(…….) 
 
I have described below how I have tried.
 
1. I am running on Windows XP and I have tested on a Pentium® D CPU
2.80GHz, 1.50 GB of RAM and it has a single processor (for a test run
only).
 

2. Installed: MPICH2 requires Microsoft .Net 2.0 .NET Framework Version
2.0 Redistributable Package (
http://www.microsoft.com/downloads/details.aspx?familyid=AEA55F2F-07B5-4A8C-8A44-B4E1B196D5C0&amp;displaylang=en
)(NETCFSetupv2.msi)
 
3. Installed: Visual C++ 2005 SP1 Redistributable Package (x86) (
http://www.microsoft.com/downloads/details.aspx?FamilyID=200b2fd9-ae1a-4a14-984d-389c36f85647&amp;DisplayLang=en
). (vcredist_x86.exe)
 
3. Installed: MPICH2 for Windows (mpich2-1.2.1-win-ia32.msi )
 
4.      I have installed R-2.10.1 and Rmpi 0.5-9. I have tested the
following code and it works.
 
library(Rmpi)
mpi.spawn.Rslaves(nslaves=3)
mpi.parReplicate(20, mean(rnorm(1000)))
mpi.close.Rslaves()
 
5. I have installed rlecuyer (0.3-1), coda (0.13-4) and lattice.
 
6. I have installed WinBUGS 1.4
 
7.      But the machine hangs on bugs.fit <- bugsParallel(…….) whenever
I run bugsparallel code. That means the program runs up to
mpi.setup.rngstream() # initializes parallel random number generation
 
model.name = "FXaExample1" # root name of modeling files
workDir = "M:/Rmpi/bugsparallel/bugsParallel/FXaExample1" # change to
match the path to the directory containing FXaExample1.R and
FXaExample1.txt
toolsDir = "M:/Rmpi/bugsparallel/bugsParallel/bugsTools" # change to
match your setup
bugsDir = paste("M:/WinBUGS14/",sep="")
nSlaves = 4
 
library(Rmpi)
library(rlecuyer)
library(coda)
library(lattice)
source(paste(toolsDir,"/bgillespie.utilities.R",sep="")) # These are a
few of my favorite things
source(paste(toolsDir,"/bugsParallel-1.0.R",sep=""))
source(paste(toolsDir,"/bugs.tools.R",sep="")) # A few BUGS-specific
utilities
 
set.seed("10271998") # not required but forces consistent results
setwd(workDir)
###################################################################
# Data management
 
xdata = read.csv("fxa.data.avg.csv")
 
# create WinBUGS data set
bugsdata = list(
            nobs = nrow(xdata),
            cobs = xdata$cavg,
            FXa = xdata$fxa.inh.avg)
 
# create initial estimates
bugsinit = function() list(
            Emax = runif(1,40,100),
            logEC50 = rnorm(1,log(100),0.4),
            gamma = 10*rbeta(1,0.25,5),
            sigma = exp(rnorm(1,log(5),0.2)))
 
# specify what variables to monitor
parameters = c("Emax","EC50","gamma","sigma","FXaPred")
 
# specify the variables for which you want history and density plots
parameters.to.plot = c("deviance","Emax","EC50","gamma","sigma")
 
################################################################################################
# run WinBUGS
 
n.chains = nSlaves
n.iter = 600
n.burnin = 100
n.thin = 5
 
mpi.spawn.Rslaves(nslaves = nSlaves) # launches multiple R slave
processes on available processors 
mpi.setup.rngstream() # initializes parallel random number generation
 
if(.Platform$OS.type == "windows"){
            bugs.fit <- bugsParallel(data=bugsdata,inits=bugsinit,
                       
parameters.to.save=parameters,model.file=paste(getwd(),"/",model.name,".txt",sep=""),
                       
n.chains=n.chains,n.iter=n.iter,n.thin=n.thin,n.burnin=n.burnin,refresh=10,clearWD=T,
                        bugs.directory = bugsDir)
}else if(.Platform$OS.type == "unix"){
#          wineBin = "/Applications/Darwine/Wine.bundle/Contents/bin"
            wineBin = "/usr/local/MacPorts/bin"
            bugs.fit <- bugsParallel(data=bugsdata,inits=bugsinit,
                       
parameters.to.save=parameters,model.file=paste(getwd(),"/",model.name,".txt",sep=""),
                       
n.chains=n.chains,n.iter=n.iter,n.thin=n.thin,n.burnin=n.burnin,refresh=10,clearWD=T,
                        bugs.directory = bugsDir, useWINE=T,
WINE=paste(wineBin,"/wine",sep=""),
                        newWINE=T,
WINEPATH=paste(wineBin,"/winepath",sep=""))
}
 
It runs up to mpi.setup.rngstream() but hangs on at
 
bugs.fit <- bugsParallel(…….)
 
Once again, thank you very much for the time you have given.
 
I am looking forward for your reply.
 
Regards,
 

Deb
 

	[[alternative HTML version deleted]]

