User Tools

Site Tools


scientific_software:compiling

Compiling Software to your home directory

Almost all software packages can be compiled in a user's home directory without need of root access. You must read carefully the documentation of the software package in order to understand the different compilation parameters. A programming environment should load all the modules that are necessary to compile, debug and profile software. Different environments are available for different compilers. Then follow the instructions for installation of the software you want to compile install. If you want to compile a different version(or compiled with different dependencies) of a software that is already compiled we recommend to load the respective module as it applies the dependencies to the compilation procedure.

Initial steps

Do not use for compilation the login node as the generated executable may not run correctly or at all in the nodes.

  • You should request an interactive session, preferably a full node. It's a good idea to request for a short amount of time, so that the interactive session will be scheduled sooner. To request a full node for half an hour:qrsh -pe smp 20 -l h_rt=00:30:00;
  • Configuration. Most of the software are based in autoconf and cmake for managing the building process: cmake .. –PARAMETERS or configure –PARAMETERS. Read the documentation in order to find and load the proper dependencies using the module infrastructure.This will scan your system and create a make parameter file;
  • Parameters for cmake and autoconf can be found in documentation. The most common parameter is the destination path of the build: -prefix_parameter=installation/folder/in/your/home/directory, where prefix_parameter can be anything with prefix keyword, differs in each packages;
  • Another important parameter for choosing the CPU architecture is: -SIMD_parameter=AVX2_256 or AVX_256 , where the first on is for Haskwell CPUs(Rosalind nodes) and the second one is for Ivy Bridge CPUs(ADA nodes);

Compilation

  • The most common is the use of make utility. You can start the compilation using 20 cores: make -j 20. Note: Sometimes too many cores can cause the compilation to fail, so reduce this number.
  • After the successful compilation you can move the binaries to the final destination: make install. Set up in the module file the environmental variables and paths according to the documentation of the software. If not compiled as a static, you need to add the dependencies;

Tip

If you are installing different version of a software package that is already installed, you can load the module for specific package which set the paths for the dependencies.

scientific_software/compiling.txt · Last modified: 2016/12/11 10:55 by admin