Hprc banner tamu.png

Difference between revisions of "SW:EasyBuild:Building Your Own Software With EasyBuild"

From TAMU HPRC
Jump to: navigation, search
(Added module load example)
m (Prepare Your Environment)
Line 3: Line 3:
  
 
==Prepare Your Environment==
 
==Prepare Your Environment==
===Ada===
+
===Ada [WIP]===
  
===Terra===
+
===Terra [WIP]===
 
You must be logged onto <code>terra2</code> to access the EB build directories. You can check whether you are on the correct node or not based on the primary prompt string:
 
You must be logged onto <code>terra2</code> to access the EB build directories. You can check whether you are on the correct node or not based on the primary prompt string:
 
<pre>
 
<pre>

Revision as of 11:18, 30 September 2020

This article is meant to provide a step-by-step guide on how to compile your own software on the TAMU HPRC clusters using EasyBuild (EB). This is particularly useful if the software/version of software you're interested in does not already exist on the clusters. For more in-depth information about EasyBuild, please see the official EasyBuild documentation.

Prepare Your Environment

Ada [WIP]

Terra [WIP]

You must be logged onto terra2 to access the EB build directories. You can check whether you are on the correct node or not based on the primary prompt string:

[netid@terra2 netid]$

If your primary prompt string does not say you're logged into terra2, you can switch to terra2from your current login node by using SSH:

ssh netid@terra2

Next, you must load the EasyBuild module. This can be done simply by running the following command:

ml EasyBuild-terra-SCRATCH/

This will set up the necessary directories in your $SCRATCH folder and the environment variables for the software build and installation.

Find Your Software Configuration File

The EasyBuild community has created a series of configuration files (EasyConfigs) spanning a variety of software and versions. Simply navigate to the EasyBuild EasyConfigs repository on GitHub and find the EasyConfig you need for your software. Once you've located it, click the Raw button to access the file in your browser.
Easyconfig.png
Copy the URL of the page, and use the following command to download it directly onto the cluster:

wget url-you-just-copied

Build Your Software

Before starting the build, we advise you to edit the description of the EasyConfig file as a best practice. This will allow you to distinguish the module you've built from the ones already on the cluster (if they are identical):

### EXAMPLE ###

...

easyblock = 'ConfigureMake'

name = 'libyaml'
version = '0.2.2'

homepage = 'https://pyyaml.org/wiki/LibYAML'

description = """LibYAML is a YAML parser and emitter written in C. Built by username"""   # this line is where you can update the description

toolchain = {'name': 'GCCcore', 'version': '8.3.0'}

...

After saving your changes to the EasyConfig, just run it using the following command:

eb name-of-your-easyconfig.eb

Using Your Software

To use your newly built software, run the following command:

ml myEB

This will update your module path to include the directories containing your software installations. From here, you would just load the software module like any other module on the clusters:

### EXAMPLE ###
# note that the module name is just the name of the file with the first hyphen (-) replaced with a forward slash (/)
# also, the file extension is removed
# e.g. libyaml-0.2.2-GCCcore-8.3.0.eb becomes libyaml/0.2.2-GCCcore-8.3.0

ml libyaml/0.2.2-GCCcore-8.3.0