Iceberg reaches end-of-life on 30th November 2020. If you are running jobs on Iceberg then you need to take urgent action to ensure that your jobs/scripts will run on ShARC or Bessemer. If you have never used ShARC or Bessemer then now is the time to test your scripts. Not all software on Iceberg is available on ShARC/Bessemer.
JAGS is Just Another Gibbs Sampler. It is a program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation not wholly unlike BUGS. JAGS was written with three aims in mind:
To have a cross-platform engine for the BUGS language
To be extensible, allowing users to write their own functions, distributions and samplers.
To be a platform for experimentation with ideas in Bayesian modeling
After connecting to Iceberg (see Establishing a SSH connection), start an interactive session with the qrshx or qrsh command. To make JAGS available in this session, run one of the following module commands
module load apps/gcc/4.8.2/JAGS/4.2 module load apps/gcc/4.8.2/JAGS/3.4 module load apps/gcc/4.8.2/JAGS/3.1
You can now run the
jags Welcome to JAGS 4.2.0 on Thu Jun 30 09:21:17 2016 JAGS is free software and comes with ABSOLUTELY NO WARRANTY Loading module: basemod: ok Loading module: bugs: ok .
module load compilers/gcc/4.8.2 module load apps/gcc/4.8.2/JAGS/4.2 module load apps/R/3.3.0
Launch R by typing
R and pressing return. Within R, execute the following commands
and follow the on-screen inctructions. Answer
y to any questions about the creation of a personal library should they be asked.
The packages will be stored in a directory called R within your home directory.
You should only need to run the
install.packages commands once. When you log into the system in future, you will only need to run the
module commands above to make JAGS available to the system.
You load the rjags packages the same as you would any other R package
If you received an error message such as
Error : .onLoad failed in loadNamespace() for 'rjags', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/home/te1st/R/x86_64-unknown-linux-gnu-library/3.2/rjags/libs/rjags.so': libjags.so.3: cannot open shared object file: No such file or directory Error: package or namespace load failed for 'rjags'
the most likely cause is that you forget to load the necessary modules before starting R.
JAGS 4.2 was built with gcc 4.8.2
JAGS 3.4 was built with gcc 4.8.2
module load compilers/gcc/4.8.2 tar -xvzf ./JAGS-3.4.0.tar.gz cd JAGS-3.4.0 mkdir -p /usr/local/packages6/apps/gcc/4.8.2/JAGS/3.4 ./configure --prefix=/usr/local/packages6/apps/gcc/4.8.2/JAGS/3.4 make make install
JAGS 3.1 was built with gcc 4.8.2
module load compilers/gcc/4.8.2 tar -xvzf ./JAGS-3.1.0.tar.gz cd JAGS-3.1.0 mkdir -p /usr/local/packages6/apps/gcc/4.8.2/JAGS/3.1 ./configure --prefix=/usr/local/packages6/apps/gcc/4.8.2/JAGS/3.1 make make install