I have a large, binary, sequential access data file. Each record corresponds to data for a particular element in a large problem being analyzed. Each record is the same length. Two scenarios:
1. I launch a coarray program and each image opens this (same) file. Different images read through (skip over) the records until the file pointer is at the first element to be processed by that image. Each image then process it's own set of elements, sequentially reading records from the file as necessary. Does the file/MPI system maintain the correct/separate file pointer position(s) for each image?
2. Parallelization is achieved by an OMP 'parallel do' in a single program. Before the parallel do loop is entered, the data file is opened. Each thread is responsible for processing a subset of the elements in the problem. Does the file/OMP system maintain the correct/separate file pointer position(s) for each thread?
Or must I use a binary direct access file and calculated/seek the correct record for each read in each image or thread?