Fortran matrix partitioning