HPC✯
Official documentation
Developer toolset 6 and 7✯
To free yourself from the CentOS 7 constraint that limits the software suite around gcc to version 4.8.x, you can enable the Developer toolset.
In summary:
- You activate a Developer toolset using the following commands:
-
For version 6: scl enable devtoolset-6 bash and you get the following suite:
- gcc 6.3.x
- gcc-c++ 6.3.x
- gcc-gfortran 6.3.x
- along with the corresponding tools: gdb, make, toolchain, valgrind, etc.
-
For version 7: scl enable devtoolset-7 bash and you get the following suite:
- gcc 7.2.x
- gcc-c++ 7.2.x
- gcc-gfortran 7.2.x
- along with the corresponding tools: gdb, make, toolchain, valgrind, etc.
-
You deactivate all of this by exiting your bash session with the command exit
-
You can list the available software for these Developer Toolsets:
- For version 6: scl --list devtoolset-6
- For version 7: scl --list devtoolset-7
Virtualenv✯
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 ENV information.
- You can install your preferred libraries, for example the fictional library totoPlot: pip install totoPlot
- To exit your virtual environment, type the command deactivate.
Note that if you want to do this in Python 2.x for 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