The programming language Python (3.6/2.7) is available for SQUID. In addition Anaconda is also installed, so users can prepare any version by themselves.
For the procedure using Anaconda, please refer to this page.
 

How to use

environmental setting

    You need to set up the environment using "environment modules". Please note that the procedure is different for Python 3 and Python 2.

    for General purpose CPU nodes

    Python3.6
     $ module load BasePy
     $ python3
     
    Python3.8
     $ module load BasePy
     $ module --force switch python3/3.6 python3/3.8
     $ python3
     
    Python2
     $ module load BasePy
     $ module load python2/2.7
     $ python2

    for GPU nodes

    Python3
     $ module load BasePy
     $ module --force switch python3/3.6 python3/3.6.GPU
     $ module load BaseGCC
     $ module load cuda/11.2
     $ module load cudnn/8.2.0.53


     

Install Package

    Any package can be installed on the front-end node of SQUID. Since connection to the outside world is prohibited from the computation node, please install the packages necessary for the calculation on the front-end node beforehand.
     
    To install the package, please create a virtual environment with venv and use the pip command.
    The following is the procedure to create a virtual environment "test-env" and install "numpy".

    Create a virtual environment "test-env".
    $ python3 -m venv /sqfs/work/[group name]/[user name]/test-env/
     
    activate "test-env".
    $ source /sqfs/work/[group name]/[user name]
    /test-env/bin/activate
     
    install package "numpy"
    $ pip install numpy
     Collecting numpy
       Downloading numpy-1.20.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)
          |????????????????????????????????| 15.4 MB 8.7 MB/s
     Installing collected packages: numpy
     Successfully installed numpy-1.20.3
     
    Displays the installed packages
    $ pip freeze
      numpy==1.20.3

     

Reference Information

Python Official page
Python Japan