@@ -22,31 +22,37 @@ tutorial, open the [Cloud Shell in the Cloud Console](https://console.cloud.goog
2222### Clone this repo
2323
2424In your Cloud Shell window, clone this Github repo.
25+
2526``` bash
2627git clone https://github.com/quantumlib/qsim.git
2728```
29+
2830If you get an error saying something like ` qsim already exists ` , you may need
2931to delete the ` qsim ` directory with ` rm -rf qsim ` and rerun the clone command.
3032
3133### Change directory
3234
3335Change directory to the tutorial:
36+
3437``` bash
3538cd qsim/docs/tutorials/multinode/terraform
3639```
40+
3741This is where you will use ` terraform ` to create the HTCondor cluster required to run your jobs.
3842
3943### Edit ` init.sh ` file to match your environment
4044
4145Using your favorite text file editor, open the ` init.sh ` file. The first few
4246lines should look like this:
47+
4348``` bash
4449# ---- Edit below -----#
4550
4651export TF_VAR_project=[USER_PROJECT]
4752export TF_VAR_zone=us-east4-c
4853export TF_VAR_region=us-east4
4954```
55+
5056Replace ` [USER_PROJECT] ` with the project name you chose on the
5157` Before you begin ` page.
5258
@@ -61,9 +67,11 @@ your project will create new jobs.
6167### Source the ` init.sh ` file
6268
6369The edited ` init.sh ` file should be "sourced" in the cloud shell:
70+
6471``` bash
6572source init.sh
6673```
74+
6775Respond ` Agree ` to any pop-ups that request permissions on the Google Cloud platform.
6876
6977The final outcome of this script will include:
@@ -92,10 +100,13 @@ Terraform has been successfully initialized!
92100
93101For convenience, some terraform commands are prepared in a ` Makefile ` . This
94102means you can now create your cluster, with a simple ` make ` command.
103+
95104``` bash
96105make apply
97106```
107+
98108A successful run will show:
109+
99110```
100111Apply complete! Resources: 4 added, 0 changed, 0 destroyed.
101112```
@@ -109,10 +120,13 @@ commands to submit and monitor jobs on HTCondor.
109120### List VMs that were created by HTCondor
110121
111122To see the VMs created by HTCondor, run:
123+
112124``` bash
113125gcloud compute instances list
114126```
127+
115128At this point in the tutorial, you will see two instances listed:
129+
116130```
117131NAME: c-manager
118132ZONE: us-central1-a
@@ -143,14 +157,17 @@ complete.
143157
144158This new window is logged into your HTCondor cluster. You will see a command
145159prompt that looks something like this:
160+
146161``` bash
147162[mylogin@c-submit ~ ]$
148163```
164+
149165The following steps should be performed in this window.
150166
151167### Checking the status
152168
153169You can run ` condor_q ` to verify if the HTCondor install is completed. The output should look something like this:
170+
154171```
155172-- Schedd: c-submit.c.quantum-htcondor-14.internal : <10.150.0.2:9618?... @ 08/18/21 18:37:50
156173OWNER BATCH_NAME SUBMITTED DONE RUN IDLE HOLD TOTAL JOB_IDS
@@ -159,6 +176,7 @@ Total for query: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 su
159176Total for drj: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 suspended
160177Total for all users: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 suspended
161178```
179+
162180If you get ` command not found ` , you will need to wait a few minutes for the HTCondor install to complete.
163181
164182## 4. Get the sample code and run it
@@ -170,10 +188,13 @@ sample jobs have been provided in the Github repo.
170188
171189On the submit node, you can clone the repo to get access to previously
172190created submission files:
191+
173192``` bash
174193git clone https://github.com/quantumlib/qsim.git
175194```
195+
176196Then cd to the tutorial directory.
197+
177198``` bash
178199cd qsim/docs/tutorials/multinode
179200```
0 commit comments