\begin{alltt} \footnotesize\tt
    // {\em run simultaneously by all P processors}
    // {\em file initially contains \(N \times N\) matrix M in column major order}
    // {\em SLAB\_COLS is the number of columns per processor per slab}
    float M\_local[N][SLAB\_COLS];       // {\em this processor's portion of a slab of M[N][N]}
    float multipliers[N];             // {\em local copy of multipliers}
    int colsInMem = P * SLAB\_COLS;    // {\em number of columns in all P memories}
        
    barrier();  start clock;

    for (i = 1 to N - colsInMem)  \{
        my\_first = the first column I will handle; // processor \(i \bmod P\) handles column \(i\) 
        ncols = the number of columns I will handle, usually SLAB\_COLS;

        LU\_read(M\_local, my\_first, ncols);      // {\em get that slab from the file}
        if (I am responsible for column i) \{
            find the N-i multipliers;
            broadcast them to all other nodes;
        \} else \{
            receive the broadcasted multipliers;
        \}
        update the ncols columns in M\_local using multipliers;
        LU\_write(M\_local, my\_first, ncols);      // {\em and write the slab back}
            
        // {\em now update the rest of the columns}
        leftmost = i;

        // {\em everybody loop until everybody is done }
        while ((leftmost += colsInMem) \(<\)= N) \{
            my\_first += colsInMem;
            ncols = the number of columns I will handle
                    (usually SLAB\_COLS, but could be fewer, or even 0);

            LU\_read(M\_local, my\_first, ncols);   // {\em get that slab from the file}
            update the ncols columns in M\_local using multipliers;
            LU\_write(M\_local, my\_first, ncols);  // {\em and write the slab back}
        \}
    \}

    // {\em ok, now do the colsInMem columns not handled above }
    my\_first = the first column I will handle;
    ncols = the number of columns I will handle (as few as 0);

    LU\_read(M\_local, my\_first, ncols);          // {\em get that final slab from the file}
    for (i = i to N-1)  \{
        if (I am responsible for column i) \{
            find the N-i multipliers;
            broadcast them to all other nodes;
        \} else \{
            receive the broadcasted multipliers;
        \}
        update the columns in M\_local using multipliers;
    \}
    LU\_write(M\_local, my\_first, ncols);        // {\em and write the slab back}

    sync();                            // wait for all disk I/O to complete
    barrier();  stop clock;
\end{alltt}

