💬 In this tutorial we will install the MCL Markov cluster algorithm program to the
/projappl directory of the user on Puhti.
💭 This software is also available as an installation package (
.rpm) for various Linux distributions, but these can not be used on Puhti. Instead, we install it from the source code.
☝🏻 To follow the instructions, first set an environment variable pointing to your project’s
export PROJAPPL=/projappl/<project> # replace <project> with your CSC project, e.g. project_2001234
$PROJAPPL(if not done already) and move there. Then, create and move to a new directory for the installation:
mkdir -p $PROJAPPL/$USER cd $PROJAPPL/$USER mkdir mcl cd mcl
💬 In this case the installation package is a tar-archive file that has been compressed with gzip program.
tar -xvf mcl-latest.tar.gz
💬 After unpacking, the
ls command shows that a new directory called
mcl-14-137 has been created. This directory contains the actual installation files and documentation of the software.
git clone https://github.com/JohannesBuchner/mcl.git
💬 After cloning, the
ls command shows that a new directory called
mcl has been created. This directory contains the actual installation files and documentation of the software.
version-14-137under the mcl directory for the actual installation.
mclif cloning from git) directory and study its contents:
cd mcl-14-137 ls
💬 Installation packages often contain short installation instructions. Typically, this instructions file is called INSTALL or README.
INSTALLfile to learn how the installation should be done.
💡 Move in the file opened with
less with up and down arrows, and exit with
💬 Many open source software tools are installed using the following three steps:
makecommand that compiles the source code according to the instructions in Makefile
💭 Normally, installation packages assume that the user has the required permissions to install the software to the locations where Linux binaries and libraries normally get installed.
--prefix=<path>to tell to the
configurescript where the program should be installed (replacing
<path>with the actual path).
./configure command checks that all compilers and libraries that the software needs are available.
./configurereports about missing libraries or incorrect compilation options.
🗯 The CSC computing environment has several compiler versions and HPC libraries available.
mcl, load the GNU C compiler (
gcc) version 9.4.0:
module load gcc/9.4.0
version-14-137directory in your
$PROJAPPLarea. Thus, you need to specify the custom location for the installation using the
./configure --prefix=$PROJAPPL/$USER/mcl/version-14-137 # double check that the path is correct
make make install
☝🏻 If you intend to compile software packages larger than the rather small MCL example used here, please use the fast local disk (
$TMPDIR) to avoid stressing the parallel file system. Compiling complex applications typically cause a lot of I/O load.
make installcommands don’t give any error messages, you have successfully installed your software!
💭 Typically, the executables/binaries, i.e. the compiled programs that can be launched, are stored in a subdirectory called
💬 Although the software is now ready to be run, it is not automatically added to your
$PATH. This means that running:
will give an error message
bash: mcl: command not found.
💬 You need to tell the computer where to find that command.
$PATHenvironment variable. This is done with the command:
export PATH=$PROJAPPL/$USER/mcl/version-14-137/bin:$PATH # double check that this path matches your actual installation path
‼️ When running
export, note that the variable we are defining (first
PATH) should not have a dollar sign. Also, note that we include the current
$PATH at the end (with a dollar sign).
💬 Remember that the
PATH variable must be set each time you login to the supercomputer before you can run the
mcl command without providing the full path.
☝🏻 You need to run the correct
export PATH=... command also in batch job files before launching self-installed programs without the full path.
💡 If you want to make the addition automatically, add the
export PATH=... command to your
.bashrc file in your
‼️ Making changes to the
.bashrc file may cause incompatibilities with software installed by CSC.
💭 If you wish to revert your
.bashrc file (and your environment in general) back to default, you can use the csc-env command.
💡 Note that loading modules installed by CSC will automatically modify your
$PATH as needed, so no exports are typically required if you only run pre-installed applications.
mcl-latest.tar.gzpackage and the whole
cd $PROJAPPL/$USER/mcl rm mcl-latest.tar.gz rm -r mcl-14-137