This may be a good time to learn
Inline::C (is there an Inline::Fortran?). It will save you the time of writing a large matrix to a file and reloading it in another program, etc. You may also want to take a look at
PDL, as it claims to be
very fast for manipulating large matrix. I've never used it, but the interface looks pretty logical, and it may be simpler than to try to roll your own super-fast matrix mangler in C.
blokhead