Description
Tasks
Download from Blackboard the file rw.py which runs a random walk experiment. Read it to understand how to run it and the data it will output. You don’t need to understand any theory or applications of random walks.
Write submit.sh and taskfarm.sh files suitable for running rw.py 20 times with taskfarming on ICHEC as studied in lectures and labs. The 20 runs should use random seeds 0-19 inclusive.
(NB: if the resulting .out file contains text such as CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’., try editing submit.sh to replace conda activate myenv with new lines conda init and source activate myenv, and re-running.)
When the run is successful, you will have 20 new .dat files on kay. Copy the resulting .out and .dat output files from kay to your own machine. Write a program called rw_plot.py which uses Python libraries to combine the data from the .dat files and produce a scatter-plot named rw_results.png showing norm against d. Hint: np.concatenate may be useful for combining data. The plot should look similar to below.
1
Take a screenshot of the email you receive from the SLURM workload manager when your job completes successfully (if you have multiple emails, choose the one whose job ID matches your successful run and .out file). It should be a screenshot from a mail client on a computer, not a phone, so that it clearly shows the
From: and To: and Subject: fields, the job ID, total runtime, and other data, and the email timestamp. It should be named screenshot.png.
Submit a zip including:
- sh
- sh • rw.py (do not alter it)
- py
- all .dat files
- the .out file
- png • screenshot.png.



