Corrections Solicited

The list below contains all of the errors found to date for Principles of Parallel Programming. If you discover an error not in this list, please send it to lin AT utexas DOT edu and/or snyder AT cs DOT washington DOT edu. We will be very appreciative, as will your fellow readers.

Acknowledgments

We wish to express our sincere gratitude to the following readers for their contributions: Evan Herbst, Edin Hodzic, David Jefferson, Vincent Liu, Jeff Lowney, and Julia Schwarz.

Errata

  • p. 82 The equation for E2 should have TS/T2 as the numerator.

  • p. 94 The third sentence should read:
    For example, threads might make protected global references and then call localize to make local references.

  • p. 103 Line 2 should read:
    2 forall (index in (0..25))

  • p. 107 Line 23 should read:
    23 for (p=d-1; p>=0; p--)

  • p. 116 The inline code should read:
    topEdge = min/Pt.y; Find smallest y field of the Pt array
    botEdge = max/Pt.y; Find largest y field of the Pt array
    rightEdge = max/Pt.x; Find largest x field of the Pt array
    leftEdge = min/Pt.x; Find smallest x field of the Pt array

  • p. 121 Line 17 of Figure 5.5 should read:
    17 if (t.smallest1>elem)

  • p. 121 In Figure 5.5, the return statement of the accum() procedure should be outside of the else clause, so lines 28 and 29 should read:
    28 }
    29 return t;

  • p. 125 In Figure 5.8, the return statement of the combine() procedure should be outside of the for loop, so the last body lines of the function body should read:
    }
    return t;

  • p. 142 In Exercise 5, the reference to Figure 5.5 should be to Figure 5.10.

  • p. 146 On line 16 of the code fragment, pthread_join_ should be pthread_join

  • p. 156 In Figure 6.3, lines 11 and 12 should be replaced by the following:
    11   while ((put+1)%SIZE == get)

  • p. 158 In Figure 6.5 all instances of Waiting thread reading pthread_cond_signal() should be pthread_cond_wait()

  • p. 168 Figure 6.11: Line 18 should read
    18   while (in==out)

  • p. 169 Figure 6.12: Line 19 should be deleted, and Line 24 should be replaced by the following:
    24   readers++;

  • p. 179 Figure 6.16: Lines 119-126 should read
    119 for (i=0; i<n+2; i++)
    120 {
    121         val[i][0] = 1.0;
    122         new[i][0] = 1.0;
    123 }
    124 for (i=0; i<n+2; i++)
    125 {
    126         for (j=1; j<n+2; j++)

  • p. 181 Figure 6.20: Line 12 should read
    12 int start=index*n_per_thread + 1;

  • p. 181 Figure 6.21: Line 12 should read
    12 int start=index*n_per_thread + 1;

  • p. 186 Figure 6.25: Line 9 should read
    9 int start=index*n_per_thread + 1;

  • p. 195 Figure 6.28: Line 9 should be
    9 #pragma omp for schedule(static) private(i)

  • p. 196 Code Spec 6.21: The body of the <body> should be surrounded by curly braces:
    { <body> }

  • p. 197 In Code Spec 6.22, the syntax for the reduction operator should read as follows:
    reduction(<op >,<list >)

  • p. 207 In Code Spec 7.5 the last argument is wrong; it should be as follows:
    MPI_Comm comm // An MPI communicator

  • p. 209 in Code Spec 7.7 the first four lines should be
    void *sendBuffer, // Address of data to send
    void *recvBuffer, // Address at which to receive data
    int count, // Number of elements to receive
    MPI_Datatype datatype, // Type of each element

  • p. 209 Code Spec 7.8: int destbuffer should be void *destbuffer

  • p. 211 Code Spec 7.9: int recvbuffer should be void *recvbuffer

  • p. 211 Code Spec 7.9: In the "notes" MPI_Gcatterv should be MPI_Gatherv

  • p. 217 The code sample, line 31: MPI_ should be MPI_INT

  • p. 221 Figure 7.6, line 158: The first argument to MPI_Recv should be
    &val[Height-1][1]

  • p. 222 Figure 7.6, line 185: The fifth argument to MPI_Reduce should be MPI_MAX

  • p. 222 Figure 7.6, line 188 should read:
    while (globalDelta >= THRESHOLD)

  • p. 225 Figure 7.8, line 158: The first argument to MPI_IRecv should be
    &val[Height-1][1]

  • p. 226 Figure 7.8, line 217: The fifth argument to MPI_Reduce should be MPI_MAX

  • p. 226 Figure 7.8, line 220 should read:
    while (globalDelta >= THRESHOLD)

  • p. 240 In the last line of the Code Spec 8.2 should read "indicated" rather than "indicted"

  • p. 252 In the last code fragment, the fourth line had an extraneous right parenthesis and should read
    [1..m,1..n] D :=D/Score;

  • p. 255 In Code Spec 8.5, the inline code should read
    [1, 1..5] ... +<<[1..3, 1..5] A ... // reduce
    [1..3,1..5] ... >>[1, 1..5] A ... // flood

  • p. 257 The second indented line should read
    C <=> e r e r d d o

  • p. 260 Figure 8.3: on the fourth line of the main body of code, the variable ran should be rank

Last Updated

August 29, 2008