User Tools

Site Tools


Installing Darshan-Ruby

IMPORTANT: Darshan-Ruby has been designed for Darshan version 2.2.8 to 2.3.0. Because of the important refactoring done in Darshan for its version 3, the version of Darshan-Ruby presented on this page is not compatible with Darshan 3 and above. A new Ruby wrapper to Darshan 3 is developed at Argonne National Laboratory, you can find it here.


If you haven't installed Darshan already, download it at You will need the darshan-util part. Darshan-Ruby versions are adapted whenever a new version of Darshan is published.

Darshan versions working Darshan-Ruby versions
3.0.0 and above see here
2.2.8 1.1.2, 1.1.3
2.2.9-pre1 1.1.3, 1.1.4
2.3.0 1.1.3, 1.1.4

We strongly advise to use the latest version of Darshan and the corresponding version of Darshan-Ruby. Darshan-Ruby requires Darshan to be compiled with zlib and bzip2 support (found respectively in the zlib-dev and libbz2-dev packages on Debian, for instance). These libraries are usually included in most versions of Unix systems.

In the following, we will assume that Darshan is installed in $HOME/local. This can be done with the following commands from the darshan-util directory:

  ./configure --with-zlib=... --with-bzlib=... --prefix=$HOME/local --enable-shared
  make install

Note for Darshan 2.2.8: the make install process forgets to copy one header in the include directory; you have to manually copy darshan-util-config.h in the $HOME/local/include directory (or wherever you've installed Darshan). This problem is solved starting from Darshan 2.2.9-pre1.


Darshan-Ruby comes as a Ruby gem extension and as such, it requires to have the rubygem utility installed. To install the gem, simply type

  gem install darshan -- --with-darshan-dir=$HOME/local

If the headers and libraries are located in different directories, you can also do:

  gem install darshan -- --with-darshan-lib=$HOME/local/lib --with-darshan-include=$HOME/local/include 

These commands will install the latest version of Darshan-Ruby. If you need another version, use for example:

 gem install darshan -v 1.1.2 -- --with-darshan-dir=$HOME/local

You can then check that Darshan-Ruby can be properly loaded by entering an irb interpreter and typing

  require "rubygems"
  require "darshan"

Which should respond “true” (if your Ruby interpreter auto-requires rubygems, the first command will return “false”).

Darshan-Ruby has been tested on

  • Ubuntu 10.4 with Ruby 1.8.7 and 1.9.3 (problems with building the gem on 1.9.1)
  • Debian with Ruby 2.1.2
  • Mac OS X 10.7 with Ruby 1.8.7 and Ruby 2.0.0
darshanruby.txt · Last modified: 2016/03/31 16:23 by mdorier