This short manual walks you through the steps necessary to run a Python script on Noether.
- Login to Noether as
ssh [your_username]@noether.hep.manchester.ac.uk. - Once in, use
lsto see what is in your directory. Warning: some newer Noether accounts are not created with this folder (and subsequent ones within it). If you do not have them, please make them (for your sake). cd scriptsto go inscripts.scriptshas 3 folders (bin,etc,out) which are the launching ground for all of your jobs.-
bin(for binary) contains your executable scripts, i.e. the scripts you want to run. -
etcis the submission folder, i.e. where you set up.subfiles that send job requests to the cluster. Here is a sample.subfile:executable = bin/jupyter.sh request_memory = 8G request_cpus = 4 request_disk = 5G initialdir = $ENV(HOME)/scripts output = out/jupyter/jupyter-$(Process).out error = out/jupyter/jupyter-$(Process).err log = out/jupyter/jupyter-$(Process).log arguments = $(Process) should_transfer_files = yes when_to_transfer_output = ON_EXIT queue 1executable: the script you want to run.request_memory: how much RAM you want to use for the jobrequest_cpus: how many CPUs you want to use for the jobrequest_disk: how much disk space you want to use for the jobinitialdir: the directory where yourout(as well asbinandetc) is.outputerrorlog: tells the cluster where to send the.output,.error, and.logfiles that are created when you run your job. These are sent into theoutfolder and are explained below.queue: tells the cluster how many times you want to run your job.
-
outcontains.errfiles which display any errors that occurred..logfiles which document the CPU usage of the cluster while the job is running..outfiles which display the terminal output of the code.
-
-
Copy the script you'd like to run into your
binfolder by typing the following line in the terminal:scp [local_path]/[your_script].py [your_username]@noether.hep.manchester.ac.uk:/gluster/home/[your_username]/scripts/bin/. You will now be asked to input your password and then the script will be copied into yourbinfolder in Noether. -
Once your script has been copied, login to your Noether account and then go into your
etcfolder by typing:cd scripts/etc. -
Once in the
etcfolder type:cp sleep.sub [your_script].subto create a submissions file in the right template. After that, you should edit theexecutable,output,error, andlogentries in the[your_script].subas:executable:bin/[your_script].shoutput:out/[your_script]-$(ClusterId)-$(Process).outerror:out/[your_script]-$(ClusterId)-$(Process).errlog:out/[your_script]-$(ClusterId)-$(Process).log
-$(ClusterId)is used to keep track of multiple runs of the same job. Every time you run a job, you run it with a differentClusterId, by adding that to your output you can keep track of your run history of a specific script. -
Then go into
binfolder (cd ../bin) and create an empty submission file by typing:touch [your_script].sh. -
In this file you want to add two things:
- Add a source to a Python environment. You do this by typing:
source /gluster/[path_where_python_environment_is]. - Tell the cluster which file to run. You do this by typing:
python3 /gluster/home/[your_username]/scripts/bin/[your_script].py
- Add a source to a Python environment. You do this by typing:
-
Go back in the
scriptsfolder and type:condor_submit etc/[your_script].sub. -
This will run your job.
-
You will see the output of the job in the
outfolder. There will be three new files which have been explained earlier:[your_script]-[ClusterId]-0.out[your_script]-[ClusterId]-0.err[your_script]-[ClusterId]-0.log