Skip to content

Just Another Gibbs Sampler (JAGS)

JAGS is used for analyzing Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC).

Minimally Tested

JAGS has only been minimally tested on our cluster to support rjags for R and we cannot guarantee it works in all cases. If you do want to use JAGS for your project, please contact the HPC Team so we are aware that it's being used.

This guide was added just to make note that it exists on the BOSE cluster.

Availability

Cluster Module/Version
BOSE jags/4.3.2
BGSC Not Available

Note: You can simply use module load jags to activate the most recently installed version of this software.

rjags

rjags is the R interface for the JAGS MCMC library, which requires this module to first be loaded for it to work properly.

Command Line
module load jags
module load R
Rscript script.R
script.R
install.packages('rjags')
library('rjags')

Sample Slurm Script

submit.sh
#!/bin/bash
# -- SLURM SETTINGS -- #
# [..] other settings here [..]

# The following settings are for the overall request to Slurm
#SBATCH --ntasks-per-node=32     # How many CPU cores do you want to request
#SBATCH --nodes=1                # How many nodes do you want to request

# -- SCRIPT COMMANDS -- #

# Load the needed modules
module load jags    # Load JAGS

Real Example

Has your research group used JAGS in a project? Contact the HPC Team and we'd be glad to feature your work.

Citation

JAGS has no documentated citation that we could find and it was released under the GPLv2 License.

Resources