I am working on linear regression with ScaLAPACK. So far, I do generate a random matrix A using the PFDMATGEN routine.
I give to PFDMATGEN the size of the matrix I want (m,n), the number of processor p. The procedure generates the random data and divides them into p file 'A.dat_i' where i is a process number.
Then I calculate a linear regression on the matrix A with out-of-core parallel mode of ScaLAPACK through a QR factorization / resolution (PFDGEQRF / PFDGEQRS).
It works just fine. Thanks ScaLAPACK!
Now, I would like to work on a real matrix (for example a 'A.csv' file, or a 'A.txt' file).
How can I do that? Is there a function that, given a number of process p and a matrix A in a file A.csv (or A.txt, or whatever), will split A in p files in the format 'A.dat_i'?
Thank you very much for your anwer.

