Here is a typical example of installing software on a Linux cluster: Installing GROMACS (molecular simulation software):
Get the software
I usually download a software package to my laptop, then transfer the downloaded package to my /home directory for installation. Alternatively, if I have the http or ftp address for the package I need, I can transfer that package directly to my /home directory while logged in using the wget
utility:
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.5.5.tar.gz
Unzip and unpack the "tarball"
tar -zxf gromacs-4.5.5.tar.gz
cd gromacs-4.5.5
Set up your environment for compiling the software.
Here, to compile a parallel build of GROMACS, I need the MPICH2 libraries. Compiling GROMACS also requires some version of the GCC compilers and the FFTW libraries:
module load gnu8/8.3.0 mpich/3.3.1 aocl-fftw/2.2
Run the configure script.
Typical Linux installations will make use of a script named configure
that allows for customization. The --prefix
option allows you to specify a custom install location. This allows you to run a make install
without targeting a system location (which requires root privileges).
More options should be described in your software's installation instructions. In this example, a few other options are also used, such as the choice of not installing a graphical interface (--without-x).
./configure --prefix=$HOME/gromacs/4.5.5 --disable-float --enable-mpi --without-x --disable-shared
Run make to compile the source code
Typical Linux installations involve the process of compiling the software so it will run with the particular hardware and software available. The make
command uses a special file called Makefile to guide the process of compiling large numbers of source code files (instead of just compiling one or a few source code files).
Install the newly compiled software
In this case, the executables, libraries, and other software files will be installed to the directory specified with the --prefix flag in step 4.
Configure environment settings
Now that the new software package has been installed, you can customize your environment to give you access to your new software automatically. This usually involves appending the location of the new software to your existing environment variables, such as: PATH
, LD_LIBRARY_PATH
, INCLUDE
. You may also need to add new environment variables that are specific to your software package. The installation instructions should explain what needs to be done. If you add these to the hidden file ~/.bashrc in your account, the environment variables will automatically be set each time you log in.
module load gnu8/8.3.0 mpich/3.3.1 aocl-fftw/2.2
export PATH=/home/u1/galen/gromacs/4.5.5/bin:$PATH
export LD_LIBRARY_PATH=/home/u1/galen/gromacs/4.5.5/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=/home/u1/galen/gromacs/4.5.5/lib:$LIBRARY_PATH
export C_INCLUDE_PATH=/home/u1/galen/gromacs/4.5.5/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/home/u1/galen/gromacs/4.5.5/include:$CPLUS_INCLUDE_PATH
export MANPATH=/home/u1/galen/gromacs/4.5.5/share/man:$MANPATH
export MPI_HOME=/opt/mpich2/1.4
export FFTW_HOME=/opt/fftw/2.1.5-double