Table of Contents
Install OpenBUGS 3.0.7 on Linux server
The following instructions were tested on Red Hat Enterprise Linux Server release 5.4 (Tikanga), Kernel version 2.6.18-164.11.1.el5. Could work for other linux releases.
Installation
The new version of OpenBUGS (v.3.0.7) can be run on Linux machine very easily. To install it on a linux machine, following these steps (adapted from openbugs.info)
- Create a directory named OpenBUGS307 and create two sub-directories within it: bin and lib.
- Download the shared library libOpenBUGS.so to the lib directory.
- Download the bash shell script, OpenBUGS, to the bin directory.
- Download the compiled C program, OpenBUGSCli to the bin directory.
- Change the permission of OpenBUGS and OpenBUGSCli using
chmod 755 OpenBUGS OpenBUGSCli
Use OpenBUGS
To use the interactive OpenBUGS, in the prompt, type the following and return (in the folder of bin)
./OpenBUGS
Below is an example to run OpenBUGS interactively using the Rats example:
$ ./OpenBUGS
OpenBUGS version 3.0.7 rev 397
type 'modelQuit()' to quit
OpenBUGS> modelCheck("model.txt")
model is syntactically correct
OpenBUGS> modelData("data.txt")
data loaded
OpenBUGS> modelCompile()
model compiled
OpenBUGS> modelInits("init.txt")
model is initialized
OpenBUGS> modelUpdate(1000)
1000 updates took 0 s
OpenBUGS> samplesSet("alpha0")
monitor set
OpenBUGS> samplesSet("beta.c")
monitor set
OpenBUGS> samplesSet("sigma")
monitor set
OpenBUGS> modelUpdate(10000)
10000 updates took 0 s
OpenBUGS> samplesStats("alpha0")
mean sd MC_error val2.5pc median val97.5pc start sample
alpha0 106.6 3.669 0.04221 99.41 106.6 113.6 1001 10000
OpenBUGS> samplesStats("*")
mean sd MC_error val2.5pc median val97.5pc start sample
alpha0 106.6 3.669 0.04221 99.41 106.6 113.6 1001 10000
beta.c 6.186 0.1091 0.001411 5.972 6.187 6.398 1001 10000
sigma 6.097 0.468 0.007489 5.263 6.07 7.106 1001 10000
OpenBUGS> samplesCoda('*', 'codafilename')
OpenBUGS> modelQuit()
To run OpenBUGS in batch format, one can save all the scripts in a file such as script.txt and then issue the command at the prompt
./OpenBUGS script.txt
Instructions for executing OpenBUGS can be obtained by typing
./OpenBUGS -h
Below is a list of related files used in the example

Discussion
If you are using the 64-bit OS, for example, 64-bit Ubuntu. You may need to install 32-bit libraries to use OpenBUGS. On Ubuntu, you may use
sudo apt-get -V install ia32-libs