I'm trying to read an ASCII file with MPI_FILE_READ. I found out that I need first of all to read the entire file and put it on a character string.
The problem is that I didn't found how to split this string on a lines because I don't know how to detect a new line in a character string with fortran.
In some way I'm searching the equivalent of this C++ code in Fortran :
nlines = 0;
for (int i=0; i<file_size;i++)
if (data[i] == '\n') (*nlines)++;