Installation de logiciels dans votre répertoire /home

Revision as of 16:58, 9 July 2017 by Diane27 (talk | contribs)
Other languages:

La plupart des logiciels utilisés par les chercheurs universitaires sont disponibles gratuitement sur Internet. Vous pouvez demander à Calcul Canada s'installer de tels logiciels que vous pourrez ensuite utiliser avec la commande module load (voir Utiliser les modules); pour ce faire, écrivez à support@calculcanada.ca en joignant l'adresse URL pour l'installation. Si les clauses de la licence et les exigences techniques le permettent, le logiciel sera habituellement disponible dans 24 à 48 heures ouvrables.

Vous avez le droit d'installer des logiciels dans votre propre espace projet ou dans votre espace home, par exemple pour

  • apporter vous-même des modifications au code
  • évaluer un produit avant le temps alloué pour l'installation par notre équipe (24 à 48 heures ouvrables).

Prenez connaissance des directives pour l'installation du logiciel. Il s'agit souvent des instructions décrites ci-après.

configure; make; make install

 
 [nom@serveur ~]$ ./configure
 [nom@serveur ~]$ make
 [nom@serveur ~]$ make install
 

Cette syntaxe de commande est fréquemment utilisée, avec des variantes telles cmake . au lieu de ./configure et sudo make install au lieu de make install.

Ces instructions fonctionnent comme prévu à l'occasion, mais make install crée quelquefois un obstacle car le logiciel s'attend à pouvoir écrire dans /usr/local ou autre espace partagé du système de fichiers. La commande sudo make install causera toujours l'arrêt de la procédure parce que sudo exige les permissions d'administrateur (root). La solution consiste à placer un indicateur --prefix à l'étape configure pour que l'installation soit dirigée vers le répertoire de votre choix, par exemple

Question.png
[nom@serveur ~]$ ./configure --prefix=$PROJECT/some-package && make && make install

Si d'autres erreurs surviennent, contactez support@calculcanada.ca. Pour les détails, consultez les pages Make, Autotools et CMake.

BLAS/LAPACK and MKL

Many software packages expect the commonly used numerical linear algebra libraries BLAS and LAPACK to be available as -lblas and -llapack which isn't the case on Compute Canada systems, where these libraries are integrated with Intel's Math Kernel Library (MKL). If you are using one of the Intel compilers (e.g. ifort, icc and icpc) then the solution is quite simple, you need only add the flag -mkl=sequential (without internal MKL threading) or -mkl (with threading) to your compiler and linker options in order to ensure that the MKL and thus BLAS/LAPACK are used; see also here. If you are using a non-Intel compiler, for example the Gnu compiler collection, then you will need to explicitly list the necessary MKL libraries during the link phase; Intel provides a tool for building the link syntax which you can use here.

apt-get et yum

Si le logiciel fait appel à apt-get ou yum, l'installation ne fonctionnera probablement pas. Cherchez des instructions qui mentionnent to build from source ou contactez support@calculcanada.ca pour de l'aide.

Paquets Python, R et Perl

Ces langages possèdent d'importantes librairies de modules et des outils de gestion des modules pour aisément installer les fichiers de tous types dans votre répertoire home. Consultez les pages Python, R et Perl pour savoir si le paquet dont vous avez besoin est disponible; autrement, vous pouvez l'installer par vous-même en suivant les directives sur chacune des pages.

The Compute Canada software stack

Almost all software that is used on the new clusters is distributed centrally, using the CVMFS file system. What this means in practise is that this software is not installed under /usr/bin, /usr/include, and so on, as it would be in a Linux distribution, but instead somewhere under /cvmfs/soft.computecanada.ca, and is identical on all new clusters.

The core of this software stack is provided by the nixpkgs/16.09 module, which is loaded by default. This software stack, internally managed using the Nix package manager, is located at /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09. The environment variable $EBROOTNIXPKGS should be used to refer to this path. Under this location you can find all of the common packages typically included with Linux distributions, for instance make, ls, cat, grep, and so on. Typically, when you compile some software, the compiler and linker will automatically look for header files and libraries in the right location (via the environment variables $CPATH and $LIBRARY_PATH, respectively). Some software, however, has been hardcoded to look under /usr. If that is the case, the compilation will typically fail, and needs to be explicitly told about $EBROOTNIXPKGS. Sometimes that means adjusting a Makefile, sometimes it needs to be specified in a certain --with- flag for the configure script, or a configuration file needs to be edited. If you are not sure how to do this please do not hesitate to ask for help.

Similarly, if a package depends on a library that is provided by a module other than nixpkgs, you may need to provide the location of the header files and libraries of that module. The EBROOT convention applies to all modules, e.g. the HDF5 library is installed in $EBROOTHDF5, and its include and lib subdirectories once you module load hdf5.

If a header file or library that would usually be provided by an RPM or other package manager in a typical Linux distributon is neither present via nixpkgs or via another module, please let us know. Most likely it can be easily added to the existing stack.

Notes:

  • all binaries under /cvmfs/soft.computecanada.ca use what is called a RUNPATH, which means that the directories for the runtime libraries that these binaries depend on are put inside the binary. That means it is generally *not* necessary to use $LD_LIBRARY_PATH. In fact, $LD_LIBRARY_PATH overrides this runpath and you should not set that environment variable to locations such as /usr/lib64 or $EBROOTNIXPKGS/lib. Many binaries will no longer work if you attempt this.
  • if you install precompiled binaries in your home directory (for example Miniconda) they may fail using errors such as /lib64/libc.so.6: version `GLIBC_2.18' not found. Often such binaries can be patched using our setrpaths.sh script, using the syntax setrpaths.sh --path path [--add_origin] where path refers to the directory where you installed that software. This script will make sure that the binaries use the correct interpreter, and search for the libraries they are dynamically linked to in the correct folder. The option --add_origin will also add $ORIGIN to the RUNPATH. This is sometimes helpful if the library cannot find other libraries in the same folder as itself.
  • if all else fails you can use module --force purge to remove the CVMFS environment. You are then left with a bare-bones CentOS-7 installation without modules. This may help for special situations such as compiling GCC yourself or using custom toolchains such as the MESA SDK. Purging modules would then only be necessary when you compile such software; the modules can be reloaded when running it.