Building Applications: Developer Notes
Instructions in the form of a recipe for installing application software in the recommended location for Peregrine. After applications are built, refer to Building Modules: Developer Notes.
Libraries and applications are built around the concept of 'toolchains'; at present a toolchain is defined as a specific version of a compiler, and possibly and MPI library. Applications are typically built with only a single toolchain, whereas libraries are built with and installed for potentially multiple toolchains as necessary to accommodate application needs. Workflows are primarily composed of the execution of a sequence of applications which may use different tools and might be orchestrated by an application or other tool. The toolchains presently supported are:
- comp-intel (No MPI)
- gcc (no MPI)
Loading one of the above MPI-compiler modules will also automatically load the associated compiler module (currently gcc 4.8.2 and comp-intel/13.1.3 are the recommended compilers). Certain applications may of course require alternative toolchains. If demand for additional options becomes significant, requests for additional toolchain support will be considered on a case-by-case basis.
Software Installation Trees
Applications and libraries are installed in the /nopt/nrel/[apps,ecom] directory hierarchy. Each package is downloaded to and installed in its own directory, which holds different versions of that application and for which the user environment is controlled through modules.
The directory is, usually named after the package and contains a subdirectory, dist, which contains the source or binary distribution of the different versions of the application or library. Each version of the application is usually installed in it own version directory with indication of toolchain used to build the software. An example directory hierarchy for the applications is as following.
[<you> /nopt/nrel]$ nrel]$ tree -L 2 apps/hdf5 apps/hdf5 ├── 1.8.11-impi-gcc │ ├── bin │ ├── include │ ├── lib │ └── share ├── 1.8.11-impi-intel │ ├── bin │ ├── include │ ├── lib │ └── share ├── 1.8.11-openmpi-gcc │ ├── bin │ ├── include │ ├── lib │ └── share ├── 1.8.11-serial-gcc │ ├── bin │ ├── include │ ├── lib │ └── share ├── 1.8.11-serial-intel │ ├── bin │ ├── include │ ├── lib │ └── share └── dist ├── README_NREL ├── build_hdf5 ├── environ.impi-gcc.out ├── environ.impi-intel.out ├── environ.openmpi-gcc.out ├── environ.serial-gcc.out ├── environ.serial-intel.out ├── hdf5-1.8.11 ├── hdf5-1.8.11.tar.gz ├── hdf5-1.8.11.tar.md5 ├── szip-2.1 ├── szip-2.1.tar.gz ├── zlib-1.2.5 └── zlib-1.2.5.tar.gz
Access to Application Directories
- The NREL HPC Applications capability support software located in /nopt/nrel/apps on Peregrine. To obtain membership in the group associated with access with app, email firstname.lastname@example.org
- The ESIF HPC Community collaborates on, installs and shares software out of project directories or out of /nopt/nrel/ecom To obtain membership in the group associated with access to ecom, email email@example.com
Building Application Software
1. Create the directories for the software installation in the correct locations.
% mkdir -p /nopt/nrel/apps/mysoft/dist # Put software distribution here, source or binary. % mkdir -p /nopt/nrel/apps/mysoft/1.3 # Software binaries, libraries etc. are installed here. % touch /nopt/nrel/apps/mysoft/dist/README_NREL # Information and documentation of the installation are noted here.
2. Build the software in mysoft/dist, install the software in mysoft/<version>, and document installation in place, dist/README_NREL
% cd /nopt/nrel/apps/mysoft/dist % tar xvzf mysoft-1.3.tgz Load the module for the target toolchain, and save a record of the current environment to help in recreating the build, e.g.: % cd mysoft-v1.3 % module load openmpi-intel % module list 2> modules.log % env 2> environment.log % ./configure --prefix=/nopt/nrel/apps/mysoft/1.3-impi-intel ... (other options as necessary) % make &> make.log % make install &> make_install.log (this should place the bin, include and lib dirs under /nopt/nrel/apps/mysoft/1.3
Especially for libraries, check make_install.log for messages concerning how to link the libary at compile-time and load the library at runtime. Note the referenced directories for use in constructing the module file later.
3. Test the software using the provided test suite or create a simple set of basic operations to test installation.
4. Update dist/README_NREL with pertinent installation notes and documentation. The content should be adequate to enable an alternative steward in the Computational Sciences Center to reproduce what was done.
% cd /nopt/nrel/apps/mysoft/dist % vi README_NREL
5. Note: The runtime environment on compute nodes does not generally match the build-time environment on the login nodes. This may be due to small version inconsistencies between CentOS (compute) and RHEL (login), or larger differences in the software environments--the compute nodes carry a "leaner" image of the operating system than do the login nodes. Thus, it is advised to build the production version of software ON A compute node, to ensure that dependencies can actually be resolved at compute-time. At a minimum, any testing should be done on a compute nodebefore making the "candidate" module available.