Skip to main content

How to Use EasyBuild for Self-Service Software

If you have a software need that isn't provided for in the existing modules, you can often find it in the EasyBuild infrastructure. Easy Build (EB) helps streamline software builds by gathering and building prerequisite software and libraries for your target package.  It selects prerequisite versions that are known to work with your target package version.  To browse a list of available software, please visit the EB site: https://easybuild.readthedocs.io/en/latest/version-specific/Supported_software.html

If you successfully build a package using EB and you think it would be beneficial to the entire ACRES community, please email helpdesk@clarkson.edu with your build procedure and OIT will replicate it in the centrally available software repository.

Many thanks to Dr. Brian Helenbrook for his contributions to this procedure.

Step-by-step guide

  1. Set up your environment:

    module purgeexport EASYBUILD_MODULES_TOOL=Lmodexport EASYBUILD_PREFIX=${HOME}/.local/easybuildexport EASYBUILD_INSTALLPATH=${EASYBUILD_PREFIX}export INTEL_LICENSE_FILE=/opt/intel/serverlicenses/l_28ZHCDPV.lic (to use the Intel compiler chains)export EB_PYTHON=python3.6pip3.6 install --prefix $EASYBUILD_PREFIX easybuildmodule use $EASYBUILD_PREFIX/modules/allmodule load EasyBuild
    
  2. Once you've set up the environment once, you'll want to make sure it's up to date each time you use it.  Do this by

    pip3.6 install --prefix $EASYBUILD_PREFIX --upgrade easybuild
    
  3. Search for EB configurations for your desired package. We'll use petsc in this example:

    eb --search petsc
    

    EasyBuild will return a list of configurations that match your search string. Select the version and toolchain you wish to use, preferably a toolchain that is already available in the central repository. Note that at this time, Intel compilers are not available on ACRES. Do not select any version that is tagged with "Intel" in the toolchain as it will not build without Intel compilers.

  4. With your EB configuration selected, do a dry run to verify what EB is about to build for you. Add the --robot flag to have EB handle prerequisites. 
    eb --dry-run PETSc-3.12.4-foss-2019b.eb --robot

    The lines with [X] already exist. Empty [ ] indicate something EB will need to build for you.

  5. Build the software. Depending on how many prerequisites there are and how complicated they are, this can take minutes to hours.
    eb PETSc-3.12.4-foss-2019b.eb --robot

  6. Once the build is complete, try it out. You'll need to include the following three lines in your submission script to ensure your new software (PETSc in this case) is found.

    export EASBUILD_PREFIX=${HOME}/.local/easybuildmodule use $EASYBUILD_PREFIX/modules/allmodule load PETSc/3.12.4
    

For more detailed information on the use of Easy Build, please see the complete documentation: https://easybuild.readthedocs.io/en/latest/