This guide will help you get started with using the EasyBuild repository for local software installations on the Michigan State University (MSU) High Performace Computing Center (HPCC). Follow the steps below to set up your environment, build software, and manage your installations.
If this is your first time using EasyBuild or havn't used it in a while, I suggest you take a look at the EasyBuild and Module System Terminology and Commands to get a better understanding of the terms used in this guide and what is happening behind the scenes when running these commands. If you feel confident in your understanding of EasyBuild, you can skip to the Hello World Example to make sure everything is working correctly.
First, clone the repository to your home directory on the HPCC:
git clone https://github.com/colbrydi/easybuild_local.git
Navigate to the repository directory:
cd easybuild_local
To begin using EasyBuild in this repository, you need to set up your environment by sourcing the activate_easybuild_local.sh script. This script loads the necessary modules and points EasyBuild to the local configuration file.
Run the following command:
source activate_easybuild_local.sh
This will load EasyBuild and configure it to use the paths defined in config.cfg.
Once your environment is set up, you can start installing software locally using EasyBuild. The repository contains EasyBuild configuration files (.eb files) for several software packages in the easyconfigs/ directory.
To install a software package, run:
eb --parallel=8 --robot ./easyconfigs/<FILENAME>.eb
Replace <FILENAME> with the name of the configuration file you want to build.
For example, you can run the example eb file provided by typing the following:
eb --parallel=8 --robot ./easyconfigs/Hello-2.10-GCCcore-11.2.0.eb
After the installation is complete, you can make the locally installed software available by running the following script:
source eb_local_use.sh
This adds the locally installed modules to the module search path, allowing you to load and use them.
For example, to load the provided example, you would run:
module load Hello/2.10-GCCcore-11.2.0
Now that the module is loaded, you can use the software as needed. For this example, you can run:
hello
And you should see the following output:
Hello, world!
This repository includes a simple "Hello, World!" example to demonstrate the process of building and installing software using EasyBuild. These are similar to the steps above.
- Clone the repository and navigate to the directory:
git clone https://github.com/colbrydi/easybuild_local.git
cd easybuild_local
- Set up your environment:
source activate_easybuild_local.sh
- Install the "Hello, World!" software:
eb --parallel=8 --robot ./easyconfigs/Hello-2.10-GCCcore-11.2.0.eb
- Use the locally installed software:
source eb_local_use.sh
module load Hello/2.10-GCCcore-11.2.0
- Run the software:
hello
You should see the output:
Hello, world!
If you need to clean up your environment and reset the installation directories, you can use the eb_local_reset.sh script. This script will delete the software/ directory and recreate the necessary directories for a fresh start. This will also deactivate your conda environment.
To reset the environment, run:
source eb_local_reset.sh
If you run into an error like this:
FAILED: Installation ended unsuccessfully
(build directory: /mnt/ufs18/home-251/wunderky/easybuild_local/tempdir/build/Hello/2.10/GCCcore-11.2.0):
build failed (first 300 chars):
Module is already loaded (EBROOTHELLO is set), installation cannot continue. (took 3 secs)
Here are some steps to try and resolve the issue:
- Unload the module before running the installation command:
module unload Hello
- See if the environment variable is set:
env | grep EBROOTHELLO
If the environment variable is set, unset it:
unset EBROOTHELLO
- Try resetting the environment and starting fresh: