Skip to content

HPC

Official documentation

http://hpc.isima.fr

Developer toolset 6 and 7

To free yourself from the CentOS 7 constraint that limits the software suite around gcc to 4.8.x, you can enable the Developer toolset.

In summary:

  • you enable a Developer toolset using the commands:
  • for version 6: scl enable devtoolset-6 bash and you get the suite

    • gcc 6.3.x
    • gcc-c++ 6.3.x
    • gcc-gfortran 6.3.x
    • as well as the corresponding tools gdb, make, toolchain, valgrind etc.
  • for version 7: scl enable devtoolset-7 bash and you get the suite

    • gcc 7.2.x
    • gcc-c++ 7.2.x
    • gcc-gfortran 7.2.x
    • as well as the corresponding tools gdb, make, toolchain, valgrind etc.
  • you disable all this by exiting your bash session by typing the command exit

  • you get the list of available software for these Developer Toolsets

  • for version 6 scl --list devtoolset-6
  • for version 7 scl --list devtoolset-7

Virtualenv

To be able to install any Python library in your user space, you can use the official tool Virtualenv official doc.

In summary:

  • Create a directory ENV in your user directory.
  • Prepare the directory by running the command virtualenv ENV. This populates the ENV directory with the expected content for the virtualenv application.
  • Activate your virtual environment by typing the command source ENV/bin/activate.
  • The virtual environment ENV is ready. The prompt is also affected and displays the information ENV.
    • You can install your favorite libraries, for example the library totoPlot (fictitious...): pip install totoPlot
  • When you want to exit your virtual environment, type the command deactivate.

Note that if you want to do this in Python 2.x on the project toto:

  • virtualenv toto
  • source toto/bin/activate
  • you can import a library that is useful for the project
    • pip install my-nice-library-in-python-2-version
  • at the end of the session, exit with the command deactivate

The same thing in Python 3.x

  • virtualenv-3 toto-v3
  • source toto-v3/bin/activate
  • you can import a library that is useful for the project
    • pip3 install my-nice-library-in-python-3-version
  • at the end of the session, exit with the command deactivate

To list the installed libraries in a given virtualenv:

  • pip freeze