Below you will find a sample session demonstrating how to use the Intel compilers to build a serial version of the HDF5 data format library with szlib compression support. This session can serve as a basic guide for compiling most software packages which use the autoconf (configure) and make tools as well.
Change to your directory in your group's space on /gscratch.
Download the package to your directory. You must do this from one of the login servers or a build node. Compute nodes do not have access to the Internet.
Start an interactive session on a build node. Return to your work directory, unpack the archive, and change to the software build directory.
Most packages should have a README, INSTALL, or other similarly named file in their root directory. You should always read these for information about how to build the software.
The README.txt file referred us to release_docs/INSTALL. Sometimes they will provide a web page with build information rather than including it in the software distribution as well.
Load the environment configuration scripts for the Intel compilers. You can view all the available modules using module avail (more details).
You can specify additional options to pass to the compilers during the build step. The below options will optimize code as much as possible for the current host. This could cause the compiler to produce code which will not run on other systems in Hyak. The compilers have numerous optimization flags. Please see the man pages or check the documentation on the Intel web site for more information.
We've previously built a supporting library for hdf5 called szip. It's a compression library. Since we've installed it in a non-system path (/gscratch/mygroup/shared/szip-2.1), we must specify the location where the header files and libraries can be found.
We also need to add the lib directory to our shared library path.
Many times there are options available for building a software package that are not listed in the installation documentation. It's useful to review all the options before going ahead.
Once you've reviewed all the options and decided which ones you want, you can go ahead and configure and build your software.
Often software packages come with a test suite. Running these tests provides some assurance your software package is compiled correctly and will work as expected.
Finally, install your software at the prefix path specified in the configure step.