instructions_for_52016_allinea_workshop.md 9.06 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
1.  [HCC-DOCS](index.html)
2.  [HCC-DOCS Home](HCC-DOCS-Home_327685.html)
3.  [HCC Documentation](HCC-Documentation_332651.html)
4.  [HCC Events](HCC-Events_332364.html)

<span id="title-text"> HCC-DOCS : Instructions for 5/20/16 Allinea Workshop </span>
===================================================================================

Created by <span class="author"> Adam Caprez</span>, last modified on
May 19, 2016

<span style="color: rgb(0,0,0);">When: May 20th, 1-2:30PM</span> <span style="color: rgb(0,0,0);">Where: UNL AVH 347 and UNO PKI 250</span>
-------------------------------------------------------------------------------------------------------------------------------------------

### Untar the files for the examples

The tarball containing the examples is located
at` /work/demo/SHARED/TrainingTools.tar.gz `on Crane.  To unpack them to
your /work directory, run the following command:

**Unpack the example files to /work**

``` syntaxhighlighter-pre
tar -zxvf /work/demo/SHARED/TrainingTools.tar.gz -C $WORK
```

This will create a `TrainingTools `folder in your /work directory with
the files.

### Setup the Allinea client software to use Reverse Connect

The Allinea DDT/MAP software supports a Reverse Connect feature.  The
GUI is installed and run locally, and information from the job running
on the cluster is sent back to your laptop/workstation via SSH.  This is
the recommended way to use the software for interactive
debugging/profiling of a job on HCC resources.  Traditional X11
forwarding will also work, but is not recommended as the interface can
be much slower to respond.  In order to follow along with the demos, use
these instructions to setup the Allinea client on your laptop.

First, download and install the remote client software for either
Windows or OS X
from <a href="https://www.allinea.com/products/forge/download#remote-client" class="external-link">this page</a>.  
Alternatively, download the software directory for your OS:
 <a href="http://content.allinea.com/downloads/allinea-forge-client-latest-MacOSX-10.7.5-x86_64.dmg" class="external-link">[OS X direct link]</a>
 <a href="http://content.allinea.com/downloads/allinea-forge-client-latest-Windows-6.1-x64.exe" class="external-link">[Windows 64-bit direct link]</a>
 <a href="http://content.allinea.com/downloads/allinea-forge-client-latest-Windows-6.1-x86.exe" class="external-link">[Windows 32-bit direct link]</a>

Start the Allinea software, and choose *Configure...* from the *Remote
Launch* dropdown menu.

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515586.png" class="confluence-embedded-image confluence-content-image-border" width="300" height="78" /></span>

  
Click the *Add* button on the new window.

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515589.png" class="confluence-embedded-image confluence-content-image-border" width="400" height="322" /></span>

  
To setup a connection to Crane, fill in the fields as follows:  
*Connection Name:  *Crane  
*Host Name:*  &lt;HCC username&gt;@crane.unl.edu  
*Remote Installation Directory:*  /util/opt/allinea/6.0

It should appear similar to this:

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515622.png" class="confluence-embedded-image confluence-content-image-border" width="500" height="306" /></span>

Be sure to replace *demo02* with your HCC username.

Click *OK* to close this dialog, and then *Close* on *Configure Remote
Connections* to return back to the main Allinea window.

Next, log in to Crane.  The Allinea software uses a *.allinea *directory
in your home directory to store configuration information.  Since /home
is read-only from the nodes in the cluster, the directory will be
created in /work and symlink'd.  To do so, run the following commands:

**Create and symlink .allinea directory**

``` syntaxhighlighter-pre
rm -rf $HOME/.allinea $WORK/.allinea
mkdir -p $WORK/.allinea
ln -s $WORK/.allinea $HOME/.allinea
```

### Test the Reverse Connect feature

To test the connection, choose *Crane* from the *Remote Launch* menu.

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515602.png" class="confluence-embedded-image confluence-content-image-border" width="300" height="114" /></span>

A* Connect to Remote Host* dialog will appear and prompt for a password.

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515603.png" class="confluence-embedded-image confluence-content-image-border" width="500" height="310" /></span>  
  
The login procedure is the same as for PuTTY or any other SSH program.
 Enter your HCC password followed by the Duo login.  
If the login was successful, you should see *Connected to:
&lt;username&gt;@crane.unl.edu* in the lower right corner of the Allinea
window.

The next step is to run a sample interactive job and test the Reverse
Connect connection.  Start an interactive job by running the following
command.

**Start an interactive job**

``` syntaxhighlighter-pre
srun --pty --qos=short bash
```

Once the job has started, load the allinea module and start DDT using
the `--connect` option.

**Start DDT**

``` syntaxhighlighter-pre
module load allinea/6.0
ddt --connect
```

  
On your local machine, a pop-up box should appear prompting you to
accept the Reverse Connect request.

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515613.png" class="confluence-embedded-image confluence-content-image-border" width="450" /></span>

Choose *Accept.*  The *Remote Launch *section should change to indicate
you are connected via tunnel, similar to:

<span
class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img src="assets/images/16515582/16515615.png" class="confluence-embedded-image confluence-thumbnail confluence-content-image-border" width="250" /></span>

Once that happens, Reverse Connect is working successfully and a
debugging or profiling session can be started.

During the Workshop
-------------------

### Compiling the examples

In order to compile and run the example programs, an MPI compiler will
need to be available.  For this workshop, it is suggested to use GCC 4.9
and OpenMPI 1.8.  To load those modules, run

**Load compiler modules**

``` syntaxhighlighter-pre
module load compiler/gcc/4.9 openmpi/1.8 allinea/6.0
```

Once the modules are loaded, you can run `make` as instructed in the
various example code folders.

### Starting interactive jobs for serial, OpenMP/pthreads, and MPI code

The `srun `syntax is slightly different depending on which type of code
you are debugging.  Use the following commands to start interactive jobs
for each type.

**Serial code**

``` syntaxhighlighter-pre
 srun --pty --time=2:00:00 --reservation=allinea bash
```

**OpenMP/pthreads code**

``` syntaxhighlighter-pre
srun --pty --time=2:00:00 --nodes=1 --ntasks-per-node=4 --reservation=allinea bash 
```

**MPI code**

``` syntaxhighlighter-pre
srun --pty --time=2:00:00 --ntasks=4 --reservation=allinea bash 
```

**Please note that the `--reservation=allinea` option will only work
during the workshop.**

Attachments:
------------

<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 11.28.32 AM.png](attachments/16515582/16515586.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 11.32.34 AM.png](attachments/16515582/16515591.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 11.32.34 AM.png](attachments/16515582/16515589.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 11.38.13 AM.png](attachments/16515582/16515595.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.15.43 PM.png](attachments/16515582/16515602.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.17.14 PM.png](attachments/16515582/16515605.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.17.14 PM.png](attachments/16515582/16515603.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.04.42 PM.png](attachments/16515582/16515643.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.05.01 PM.png](attachments/16515582/16515615.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 11.37.09 AM.png](attachments/16515582/16515622.png)
(image/png)  
<img src="assets/images/icons/bullet_blue.gif" width="8" height="8" /> [Screen
Shot 2016-05-16 at 12.04.42 PM.png](attachments/16515582/16515613.png)
(image/png)