These are supplemental instructions for running the measurements on an AWS instance. For the purposes of this document, we assume the ip address for the running instance is ubuntu@ec2-34-223-1-175.us-west-2.compute.amazonaws.com (yours will vary) and you have the security key (.pem file) needed to connect to your amazon instance.


Important: only run one instance of the measurements at once... if you run the measurements concurrently, you will run out of memory. Further, this is only tailored for the heat 3d measurement. You could try running the other measurements on AWS as well, but the instructions are just for the heat3d one, as that's the one that needs the system with larger memory.



Step 1: make sure the provided .pem file is not publically visible
> chmod 400 research_computing.pem

Step 2: connect to the instance using the provided .pem file and ssh
> ssh -i "research_computing.pem" ubuntu@ec2-34-223-1-175.us-west-2.compute.amazonaws.com

Step 3: make sure no other measurements are running on the system
> ps -e | grep python
(this should produce no output, meaning no python processes are running. If there's output, it means someone else is running an experiment and you shoudln't start another one. If you need to restart you can do 'killall python' or it's probably safer to reboot the system if you don't know else is going on).


Step 4: setup required hyst and hylaa environment variables. This involves setting PYTHONPATH. See the Hylaa and Hyst README files for more details. Hypy is included with Hyst (see the Hyst readme).


Step 5: run the measurement script. Since this takes a long time (~33 hours) we won't run it interactively, so in case the connection breaks we don't need to start over from the beginning. Instead, we'll run the process in the background, saving stdout to a file, then we'll disconnect it from ssh (changing the process owner), so that it doesn't quit if ssh closes, then we'll examine the stdout file to watch progress. If ssh closes at any time, we can reconnect and re-watch the stdout file. Also, optinally in parallel we can connect with a second terminal and run htop to watch memory usage in real-time to see how close we are to exhausting memory.

> cd RE/heat3d_runtime

> stdbuf -oL python run_heat3d_sym.py >& my_stdout.txt &
(stdbuf -oL disables unnecessary buffering when redirecting stdout, stdout and stderr will be sent to the file my_stdout.txt and the '&' starts the process in the backround)

> disown -a
(this disconnets all processes whose parent is the ssh shell, so if it closes the process keeps running)

> tail -f my_stdout.txt
(this interactively views my_stdout.txt as new content are added, you should see the new lines appearing every few seconds)

If ssh ever gets disconnected, or if you close it, you can reconnect and then view the process by using the my_stdout.txt file using the tail command.

Finally, you can connect using ssh in a different shell and use htop to monitor memory and cpu usage. Memory is probably the most important as you don't want to go over the 157GB.

> ssh -i "research_computing.pem" ubuntu@ec2-34-223-1-175.us-west-2.compute.amazonaws.com
> htop

-----------------

Note: in the repeatability package in the heat3d_runtime folder are two files, stdout_short.txt and stdout.txt. The short one is the expected std output for all but the biggest measurement, the stdout.txt is the expected output for the billion-dimensional measurement. Your output should match, save for timing variations. You can change which size systems are measured by editing the list on line 39 in the run_heat3d_sym.py script (1000 is the 1000x1000x1000 system, for example).

Finally, the script will output not just the stdout, but a results summary to './plot/data/heat_sym_summary.dat'. You can 'cat' this file periodically to see the progress. This is exactly the latex table for the measurements directly imported in the paper. You can also use this to track what is the current measurement.



Prepared by Stanley Bak, Jan 2019


