Example 1. Installing your own version of MCL program
In this example we install MCL markov cluster algorithm program to users own $USERAPPL directory in Taito.
Main steps are
- download the source code package
- Unpack/extract the package
- Compile the code
Once you have logged into Taito move to your $USERAPPL directory and create there a new directory called mcl
cd $USERAPPL mkdir mcl
Go to the just created mcl directory and download the installation package with wget command:
cd mcl wget http://www.micans.org/mcl/src/mcl-latest.tar.gz
In this case the installation package is a tar-archive file that has been compressed with gzip program. You can unpack this file with commands:
gunzip mcl-latest.tar.gz tar xvf mcl-latest.tar
After unpacking, the ls command shows that a new directory called mcl-14-137 has been created to your mcl directory (note that the version number can change from 14-137). This directory contains the actual installation files and documentation of the software. Create a new empty directory called 14.137 to the mcl directory.
ls mkdir 14.137
After this go to the mcl-14-137 directory and study its' content.
cd mcl-14-137/ ls -l
In this case we want to compile the program using gnu c compiler (gcc version 4.9.3) that is not the default compiler in Taito. To use gcc compiler change the compiler environment with command:
module swap intel gcc/4.9.3
Installation packages contain often a short installation instructions. Typically this instruction file is called as INSTALL or README. In this case you should read the INSTALL file to find out how the installation should be done.
Many open source software tools are installed using following three steps:
Building up the so called Makefile with a ./configure command.
Running make command that compiles the source code according to the instructions in the Makefile
Installing the compiled executables with command make install
Normally the installation packages assume, that the user has permissions to install the software to the locations where the standard linux commands and programs normally get installed. However, in Taito this is not posisble, since you can install software only to your own disk areas. Often you can use option --prefix=/path/ to tell to the configure command, where to the program should be installed. In this case we wish to install the software to the directory 14.137 in you $USERAPPL area. Thus you must use following ./configure command:
The configure command checks that all the compilers and libraries, that the software needs, are available. It is not uncommon, that ./configure reports about missing libraries or incorrect compilation options. In those cases you can check if the missing library or program can be taken in use with the module system. You can see all the available modules with command module avail. To use certain module, execute command module load module_name. Note also that CSC environment has several compiler and program versions available. In some cases you may for example need to use certain C-compiler or python version in order to install the software. If you still fail with the installation, ask help from the CSC Service Desk.
In the case of mcl the ./configure script runs without error messages. Next need to compile and install the software with commands:
make make install
If make and make install commands don't give any error messages, you have successfully installed your software. Typically the executables, i.e. the compiled programs that can be launched, are stored to a sub-directory called bin. In this case the bin directory is created to sub-directory $USERAPPL/mcl/14.137
ls $USERAPPL/mcl/14.137/binnow shows the programs you have installed:
clm clmformat mcl mclcm mclpipeline mcx mcxarray mcxassemble mcxdump mcxi mcxload mcxmap mcxrand mcxsubs
The name of the directory that contains the executables may vary between different software. In any case, to be able to use the programs you must tell the location of your own executables to the command shell. This can be done by adding the directory path of you executables to the $PATH environment variable. In this case we add path "$USERAPPL/mcl/14.137/bin" to the $PATH variable. This is done with command:
Note that the first PATH word in the command above is without the dollar sign. Now you can launch the program you have installed. For example:
Remember that also in the future, when you log in to Taito, the PATH variable must be set up before you can use mcl command. Further, you should take care that the compiler environment that was used for compiling the software is selected. In this case is means that you should run following setup command, before you start to use mcl:
module swap intel gcc/4.9.3
Also in the batch job files you need to load the compiler environment and run the correct export PATH command above before executing the program you have installed yourself.
If the software you have installed works correctly, you can remove the installation package and temporary directories that were used during the compilation. In this case we could remove the mcl-latest.tar file and the directory mcl-14-137/.
cd $USERAPPL/mcl rm mcl-latest.tar rm -rf mcl-14-137/
|Previous chapter||One level up||Next chapter|