Checkpoint serial pivoting algorithm that reproduces the C++ results (but about 3x faster).