Installing from source

Roar offers a broad range of installed open-source applications, but sometimes you need an application Roar does not yet have. You may then submit a Software Request, particularly if you can justify that it would be used by others.

Alternatively, you may compile and install software in your own directories. Depending on how well designed and documented the software is, installation may be straightforward and self-contained, or may require extensive modification to install missing dependent packages.

No root access

If you have worked with a laptop running Linux, one important difference between installing software on your laptop and on Roar is no root access. This means you cannot:

  • use RPM package installers like yum
  • install executables in the standard places

Hardware

To avoid hardware incompatibiities, you should build software on a node with the same processor type that will be used to run the software, by using an interactive batch session to log onto the desired compute node. On a compute node, to display the processor type, execute:

$ cat /sys/devices/cpu/caps/pmu_name

Software built on newer processors may not run on older processors. If you want to ensure your software runs on all of Roar's nodes (which vary considerably in age), build on a Haswell node (the oldest now on Roar). However, this will prevent your application from taking advantage of some performance improvements available only on the newer processors.

Release Date Processor
2013 haswell
2014 broadwell
2015 skylake
2019 cascadelake
2019 icelake
2023 sapphirerapids

wget

The first step is to get the source package (typically a tarball of some sort) from the developer website onto Roar. If you are logged on with the Portal Interactive Desktop or an SSH -X session, you can launch Firefox and download software using the browser.

Alternatively, you can use wget, to download source packages from the web:

wget <webAddress>
where <webAddress> can be copied from a browser link pointing to the file. Then, read the README files, and see what you are up against.

cmake

Many source packages are built using cmake, a Unix tool for controlling the compile and load process. To use cmake, first load its module:

module load cmake

To build from source, the typical procedure is to cd into the source folder, and execute in turn:

mkdir build
cd build
cmake <options>
make
make install

Here <options> is a list of options for cmake, that may control what version of the software to build, what assumptions to make about the CPU, what packages to include, and where to install the resulting executables. Well-designed source packages include help files that describe the various build options.

Group access

If you want others in your collab group to be able to use software that you build from source, the executables and libraries generated by the build must be placed in a directory that they can access.

To achieve this, place the executables in your group space /storage/group/<PIuserID>/default, which is read-accessible by members of <PIuserID>_collab. Note that if a PI makes an alias to their group space in their home directory, with the command

ln -s group /storage/group/<PIuserID>/default
the path /storage/home/<PIuserID>/group is not accessible to others, because their home directory /storage/home/<PIuserID> is not accessible to others.