Routine to write matrices to a file is now in the sparse matrix module, since it is actually independent of the matrix format