HPC Installation


#1

Hi Trixters,

I’m currently installing MRtrix-3.0_RC2 on an HPC system. The instructions on readthedocs (http://mrtrix.readthedocs.io/en/3.0_rc2/installation/hpc_clusters_install.html) are fair enough. However there is one notable gap (which I’m sure must have been asked before)…

How does one install into a custom directory?

The Pythonised-configure for the latest mrtrix doesn’t seem to offer this as an option whereas the standard autotools configuration simply uses --prefix=$blah. I regret that I am not nearly as familiar with python’s configure as I am with the autotools variant.

Having the ability to install multiple versions of the same software is pretty important.

All the best,

Lev Lafayette


#2

It’s as simple as copying the bin/, lib/ & share/ folders across to where you want them to be. I have to admit this is poorly documented for the current version, but is actually described in some detail for the next release (due to be pushed out imminently) – and this description applies equally to the last couple of versions.

In essence, MRtrix3 is designed to be fully relocatable: you can move the folder anywhere on the filesystem, and it’ll work just the same. There’s no need to set a prefix since there’s nothing in the code that depends on it, whether at build time or at runtime. The only requirement is that the bin/, lib/ & share/ folders remain co-located within the same parent folder.

I’m not surprised: our configure script, while written is python, is completely specific to MRtrix3 – there’s no way you could possibly have come across anything like it before.

It completely is. We do this routinely, and it is very simple to do, especially following this discussion and the changes that resulted from it. All you need is to place the relevant folders in different locations, and set the PATH to point to the relevant bin/ folder.

For example, after a successful build, just copy the bin/, lib/ & share/ folders across to where you want them to be, e.g.:

# from MRtrix3 source folder, as root if required:
mkdir -p /usr/local/mrtrix3-3.0_RC3
cp -r bin/ lib/ share/ /usr/local/mrtrix3-3.0_RC3/

So you might end up with these folders for 3 different versions of MRtrix3:

/usr/local
├── mrtrix3-3.0_RC1
│   ├── bin
│   ├── lib
│   └── share
├── mrtrix3-3.0_RC2
│   ├── bin
│   ├── lib
│   └── share
└── mrtrix3-3.0_RC3
    ├── bin
    ├── lib
    └── share

Then all your users would need to do is set the PATH to point to the bin/ folder for the version required:

export PATH=/usr/local/mrtrix3-3.0_RC2/bin:$PATH

How this is handled is up to you. I expect many sysadmins will want to set up a module load script to do this, but there’s no hard requirement on that front.

Hope this helps.


#3

Yes, that’s what I ended up doing (although I thought that docs/ would be handy in the install directory as well). It’s not really elegant or a standard approach. Separation between source, build, and install directories would be a useful improvement.

Thanks for your advice!