Index of /examples/python/basic

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]hello.py 2021-04-09 10:20 249  
[TXT]job.qsub 2021-04-09 10:21 408  

RCS EXAMPLES


Directory Structure:

  • hello.py contains a simple python script running a "Hello world" program.
  • job.qsub contains an example qsub script used to submit a batch job (which runs hello.py) to the SCC.
  • Instructions:

    Use the module system to load python.

    [user@scc1 ~] $ module load python3/3.8.6

    The SCC has multiple python versions available for both python2 and python3 (recommended). To see these options, run:

    [user@scc1 ~] $ module avail python3

    To run python interactively in the terminal:


    [user@scc1 ~] module load python3/3.8.6
    [user@scc1 ~] $ python
    >>> print("Hello world!")
    >>> exit()

    To run a python script (e.g. hello.py) directly in terminal:

    [user@scc1 ~] $ python hello.py

    To run a python script as a batch job:

    First, create a script file (e.g. job.qsub) which calls your python script (e.g. hello.py).

    Then, to submit a batch job to the SCC, run:

    [user@scc1 ~] $ qsub job.qsub

    To learn more about the options available for SCC batch jobs, see the SCC documentation on Submitting your Batch Job

    Contact Information:

    Research Computing Services: help@scc.bu.edu

    Note: Research Computing Services (RCS) example programs are provided "as is" without any warranty of any kind. The user assumes the entire risk of quality, performance, and repair of any defects. You are encouraged to copy and modify any of the given examples for your own use.