Hprc banner tamu.png

Difference between revisions of "SW:EasyBuild:Building Your Own Software:Another Example - LLVM"

Jump to: navigation, search
(Selecting an existing LLVM easyconfig)
(Search for candidate easyconfigs)
Line 26: Line 26:
=== Search for candidate easyconfigs ===
=== Search for candidate easyconfigs ===
=== Copy to a work directory so you can make modifications ===
=== Copy to a work directory so you can make modifications ===

Revision as of 17:24, 3 October 2020

This example will cover building a very recent version of LLVM using the CLang compiler. Users may first want to visit HPRC's EasyBuild page and a previous example of modifying an existing easyconfig. At some point in the process, users might want to also review the official EasyBuild documentation.


A user wants to build a modified version of the LLVM module that includes:

  1. a recent source from the LLVM Github repository
  2. adds support for CLang

LLVM is a rather long build (several hours using a single-processor). Additionally, the currently installed versions do not include CLang support. They are also rather dated (v9.01 released December 20, 2019). Newer releases include v10.0.1, released August 6, 2020. An even newer release candidate includes v11.0.0-rc5 released September 30, 2020 but as of this writing on October 3, 2020, there are already 7681 commits to master since this release. So, for this example we will use a recent (10/3/2020) .zip file of the master repo. Notes for using a bleeding edge (as of this moment) clone of the master repo are included below and are left as an exercise to the reader.

Important note on using EasyBuild to build software on terra

The instructions below are for building on any ada (and previously curie) login node. At present, on terra, the needed directories are only mounted on terra2/login2, so if you want to build for terra you will need to build there. Some things to consider:

  1. If ada2 is currently, or was recently, down (e.g. for system maintenance), the needed directories may not be available on terra2. Additionally, if terra2 was recently rebooted they may not be available. If ada2 (and terra2) is up and available for users and these directories are not yet available on terra2, please email help@hprc.tamu.edu to request they be mounted
  2. If the build requires a GPU at compile (build) time instead of just run time, you will need to use terra3/login3 (the only terra login node with a GPU). If you find your programs has this compile-time requirement, please email help@hprc.tamu.edu and someone should be able to mount the needed directories there. However, for most builds, users should use terra2/login2.

Some additional notes:

  1. Once you have built your software on terra using EasyBuild and only want to use the software you have built, the status of ada2 or terra2 is of no concern. Any software you build should a be available in your $SCRATCH directory using the 'myEB' module.
  1. At some point we hope to set up an independent | CVMFS environment for hosting, and building, all our EasyBuild software such as | the one in use up at Compute Canada. This will eliminate our dependency on any particular cluster to build/deploy software. At present, however, we do not presently have the resources to do so (they have a few more people than TAMU HPRC does and it will take a bit of planning and work to do properly here).

Converting an existing LLVM EasyBuild "easyconfig" using GCC to a much newer LLVM built using the CLang

At some point, you may want to write your own easyconfig from scratch for software not yet built on HPRC systems. That is left an exercise to the reader after they have become familiar with using EasyBuild. For now, we will stick to modifying an existing easyconfig that includes some "simple" user modifications.

Selecting an existing LLVM easyconfig

Before we get started, we'll want to find an easyconfig to convert. In this case, the user wants the most recent version of LLVM. The user also desires to use the currently HPRC-recommended 2019b toolchain which is built on GCCcore/8.3.0. See SW:Toolchains for details on toolchains currently used on HPRC clusters.

Load the EasyBuild-cluster-SCRATCH environment

Search for candidate easyconfigs


Copy to a work directory so you can make modifications

Making the desired changes to the easyconfig

The resulting easyconfig

Building the new easyconfig