HPC✯
Official documentation
Developer Toolset 6 and 7✯
To free yourself from the CentOS 7 constraint that limits the 4.8.x software suite around gcc, 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 with the command exit
-
you get the list of available software for these Developer Toolsets
- version 6: scl --list devtoolset-6
- 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 content expected by 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 ENV information.
- You can install your favorite libraries, for example the fictitious library totoPlot: 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 toto project:
- 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