iRRAM Version and Package Manager
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

irramsh is a version and package manager + compiling helper for iRRAM, which is an open source C++ library for real number computation (Exact Real Arithmetic). It will make iRRAM developer's life easier.

(1) Compile helper

Suppose you have an iRRAM source code to compile:

#include iRRAM.h
void compute()
    REAL x = pi(); 
    cout << setRwidth(100);
    cout << x

Then, this can be compiled simply by

$ irramsh -o compute_pi

(2) Version Controller

Suppose you need to use different versions of iRRAM for some reason. Let us suppose that you need (i) 2011_02 version of iRRAM and also (ii) 2017_01 version of iRRAM. Once you install both of them locally, (when you run Quickinstall of iRRAM it asks whether you want ot install locally), you can add the different version of iRRAM by simply doing

$ irramsh -v

Using version 1 installed in /path/installed
$ irramsh add
Locate iRRAM installation directory:

$ irramsh --all
Version 1 @ /path/to/old/irram/installed
Version 2 @ /path/to/new/irram/installed

$ irramsh switch 2
$ irramsh -v
Using version 2 installed in /new/path/installed

Of course, you can switch it back by simply typing

$ irramsh switch 1
$ irramsh -v
Using version 1 installed in /path/installed

(3) Package Manager

You can see current status of irramsh package

  1. irram-random by sewon park

  2. irram-poly by Charlse (to be uploaded)

You can see what packages are available by

$ irramsh show
irram-poly (tba)
irram-linear-algebra (tba)

$ irramsh install irram-random
installation complete
$ irram list

Installed packages can be used easily. For the packages' functionality, visit their websites. However, using and compiling the packages can be done by follow. Assume that you have a iRRAM source code using the installed package:

#include iRRAM.h
#include "irram-random.h"
void compute()
    REALMATRIX M = gaussian_matrix(10);
    cout << M(0,0);

It can be done simply by

$ irramsh -o randmatrix

You can also remove or deactivate the installed packages.

(4) irramsh_make

Suppose you have a project myproject where you need to compile many iRRAM files: src1/ src1/ src2/ src3/ with irramsh version 4 using irramsh packages irram-pkg1 and irram-pkg2 into an output file out.out. So, this is a big project which has its one compilation configuration.

When you have other projects working on simultaneously, in such case, you do not want to switch the irram configuration everytime to compile this; you do not want to activate/deactivate packages and switch version all the time. Moreover, typing all the source files every time is clerical.

Using irramsh_make, you can store the project's own configuration and compile it without changing any configuration of irramsh!

In the case, write the project's configuration into


- makefile for the project myproject
- The project uses irram version 3
- comment out with leading symbol '-'
* version
    + 4
* packages
    + irram-pkg1
    - irram-random
    + irram-pkg2
* sources
    + src1/
    + src1/
    - src1/
    + src2/
    + src3/
* output
    + out.out
    - test.out
* force
    - force forces overwrite when 'out.out' already exists.
    - is turned off by default
$ irramsh make
[irramsh] compile finished

Using tips

iRRAM projects that are based on in-development version may have some compatibility issues. Unless there is some inevitable reason for using only the in-development version, packages distributed through irramsh should offer to be compatible with the official version of iRRAM. However, this can be done only if the irramsh knows whether your iRRAM version is official or not.

When you first download the irramsh, you need to initialize it first (It asks for the initialization anyway). When you try to initialize or to add another version of iRRAM, after you locate the iRRAM installed directory, it asks you whether the located version is the official release version of iRRAM:

$ irramsh init
Locate iRRAM installation directory: /path/to/iRRAM/installed:
> /path/to/irram/installed
Is this the official release of iRRAM? (201401 by Norbert Mueller) [y/n]:
> Y
$ irramsh -a
version 1 @ /path2/installed Release date: 201701
version 2 @ /path1/installed Release date: 201402 (official release)

Even if you did not specified when you added, you can later specify the official release version among the registered versions:

$ irramsh -a
version 1 @ /path2/installed Release date: 201701
version 2 @ /path1/installed Release date: 201402
$ irramsh select 2
$ irramsh -a
version 1 @ /path2/installed Release date: 201701
version 2 @ /path1/installed Release date: 201402 (official release)


  1. You need (1) python2.7 and (2) locally installed iRRAM. To install iRRAM, visit

  2. clone or download the repository.

  3. add the downloaded directory to the PATH.

  4. Have fun with irramsh!