Software Build Considerations

From UABgrid Documentation
Jump to: navigation, search

Experiment reproducibility requires a known starting point.

In order to reliably build any software package it is important to start the build with a clean environment: a well defined shell environment that doesn't have excess variables set that are not needed for the build. That is, you shouldn't have a PATH or LD_LIBRARY_PATH filled with every last feature you are accustomed to keeping at your finger tips. One of the cleanest environments is "PATH=/bin:/usr/bin" and "unset LD_LIBRARY_PATH". Most builds should start with this minimal environment and then add additional values as needed to build the tool successfully.

This austere environment is only needed during a build. Once the software is build, you can return to a richer environment for interactive use.

The environment modules on Cheaha make it easy to keep your environment to the minimum necessary tools by simply loading only the modules needed. This also means that your default environment after you log in is pretty clean, though there is no harm in making it cleaner. Using a sub-shell for the build, will let you easily return to your default environment by simply exiting the sub-shell. Set up our build environment with the following commands:

bash  # creates the sub-shell
PATH=/bin:/usr/bin; unset LD_LIBRARY_PATH
# execute commands to perform the build  

After you complete the build you can return to the parent shell whose environment remains unaffected by build environment you created changes in the build sub-shell:

Personal tools