<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Read from a single data file with multiple processors in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744031#M2616</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I would like to know if it is possible to read from a single data file from multiple processors simultaneously when using a parallel code.&lt;/P&gt;
&lt;P&gt;Are the different ranks able to access the same file and read from this file independently and simultaneously ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2010 11:59:18 GMT</pubDate>
    <dc:creator>mad-matts</dc:creator>
    <dc:date>2010-02-19T11:59:18Z</dc:date>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744031#M2616</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I would like to know if it is possible to read from a single data file from multiple processors simultaneously when using a parallel code.&lt;/P&gt;
&lt;P&gt;Are the different ranks able to access the same file and read from this file independently and simultaneously ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2010 11:59:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744031#M2616</guid>
      <dc:creator>mad-matts</dc:creator>
      <dc:date>2010-02-19T11:59:18Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744032#M2617</link>
      <description>&lt;DIV id="tiny_quote"&gt;
&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=462270" class="basic" href="https://community.intel.com/en-us/profile/462270/"&gt;mad-matts&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I would like to know if it is possible to read from a single data file from multiple processors simultaneously when using a parallel code.&lt;/P&gt;
&lt;P&gt;Are the different ranks able to access the same file and read from this file independently and simultaneously ?&lt;/P&gt;
&lt;/I&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
Probably, if all open it with open(access='read',....)</description>
      <pubDate>Fri, 19 Feb 2010 13:55:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744032#M2617</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-02-19T13:55:19Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744033#M2618</link>
      <description>Are you expecting all the threads to coordinate access to the file so that records are read in order, or is each thread to be able to read the whole file without concern of other threads? If the latter, then Tim's suggestion is appropriate. If the former, you'll need to add a synchronization primitive such as a mutex or critical section around the reads.</description>
      <pubDate>Fri, 19 Feb 2010 14:37:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744033#M2618</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-02-19T14:37:41Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744034#M2619</link>
      <description>&lt;P&gt;As Tim and Steve suggest/reply, much depends on the behavior you require. As I see there are several different behaviors&lt;/P&gt;
&lt;P&gt;a) Multiple processors means multiple processes (programs) each with access to same file using one thread within process.&lt;/P&gt;
&lt;P&gt;b) One process running multiple threads, each thread sequentially reading records 1, 2, 3, ...&lt;/P&gt;
&lt;P&gt;c) One process running multiple threads, each thread reading the next un-read recrord.&lt;/P&gt;
&lt;P&gt;d) One process running multiple threads, each thread reading random records&lt;/P&gt;
&lt;P&gt;and other variations on reads (e.g. ordered queue reading)&lt;/P&gt;
&lt;P&gt;For a) the file has to be opened with appropriate SHARE&lt;/P&gt;
&lt;P&gt;For b) each thread must use different UNIT and the file has to be opened with appropriate SHARE&lt;/P&gt;
&lt;P&gt;For c) each thread must use same UNIT and the file has to be opened only once&lt;/P&gt;
&lt;P&gt;For d) either using same or different units depending on if you want same file position pointer or different file position pointers.&lt;/P&gt;
&lt;P&gt;When you have a large file that you want to sequentially read and process in parallel then generally you get better performance when you pipeline the process and use one thread to read the file into internal buffers which are then processed in parallel (one thread per buffer).&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2010 16:11:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744034#M2619</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-02-19T16:11:02Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744035#M2620</link>
      <description>&lt;P&gt;I have one MPI parallel program running simultaneously on different processors (each of which has its own memory) and I want each of them to be able to read randomly from one single file independently and simultaneously without sharing pointers.&lt;/P&gt;
&lt;P&gt;I think that's option a) of Jim's suggestions repeated below:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;a) Multiple processors means multiple processes (programs) each with access to same file using one thread within process.&lt;/P&gt;
&lt;P&gt;b) One process running multiple threads, each thread sequentially reading records 1, 2, 3, ...&lt;/P&gt;
&lt;P&gt;c) One process running multiple threads, each thread reading the next un-read recrord.&lt;/P&gt;
&lt;P&gt;d) One process running multiple threads, each thread reading random records&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am dependent on open(.... access='stream' ...) since I'm not able to read the file in neither sequential nor direct access mode due to different behaviors in reading/writing unformatted files of the machine the file was written and the machine which should read the file. Further I want to jump to certain positions in the file an not necessarily read whole records but only parts of records.&lt;/P&gt;
&lt;P&gt;Is it still possible to read from the same file simultaneously and independently from random positions ?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks and have a nice weekend !&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2010 00:43:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744035#M2620</guid>
      <dc:creator>mad-matts</dc:creator>
      <dc:date>2010-02-20T00:43:06Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744036#M2621</link>
      <description>&lt;P&gt;And what happens, if I have an machine architecture, where 8 processors in one node share their memory ?&lt;/P&gt;
&lt;P&gt;So if I use 16 processors, for example, the machine uses at least 2 nodes and I have both processors which share the same memory and processors which don't.&lt;/P&gt;
&lt;P&gt;How can I address my problem (see above) on such an architecture ?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2010 00:59:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744036#M2621</guid>
      <dc:creator>mad-matts</dc:creator>
      <dc:date>2010-02-20T00:59:28Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744037#M2622</link>
      <description>&lt;P&gt;The format of the file would make no difference; you should be able to open with both read (only) and stream options.&lt;/P&gt;
&lt;P&gt;If you are using hybrid MPI/OpenMP, if more than one thread wants to read from the file, it might be done by opening with separate units, but not fully portably. It would likely be best to read the file to shared buffers in a serial region within each MPI process. Separate MPI processes will have no trouble keeping their buffers separate in read-only mode, but then there is no easy way to coordinate among processes or avoid extra latency due to each process reading the disk physically and forcing others to wait.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2010 01:11:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744037#M2622</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-02-20T01:11:03Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744038#M2623</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;And what happens, if I have an machine architecture, where 8 processors in one node share their memory ?&lt;/P&gt;
&lt;P&gt;If your application is MPI then you would be running 8 seperate processes on the 8 different processors. There would be no functional difference.&lt;/P&gt;
&lt;P&gt;If you re-worked your application to use OpenMP to use one process with 8 threads then you could use 8 seperate UNITs, one for each thread. However, you might eek some additional performance by having each thread place read requests to an extra I/O thread. This I/O thread could then be optimized for your application. e.g. order the reads in elevator seeking pattern, or anticipate a peek and a gulp of data pattern.&lt;/P&gt;
&lt;P&gt;Before you go through too much programming effort, it may be advisable to insturment the reads so you can record the patterns of activity on the file. You may discover that by re-organizing the file or splitting the file in two, or indexing the file, that you might attain significant performance improvement.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2010 04:40:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744038#M2623</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-02-20T04:40:04Z</dc:date>
    </item>
    <item>
      <title>Read from a single data file with multiple processors</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744039#M2624</link>
      <description>OK. Thank you all for your advise !!!</description>
      <pubDate>Sat, 20 Feb 2010 13:42:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Read-from-a-single-data-file-with-multiple-processors/m-p/744039#M2624</guid>
      <dc:creator>mad-matts</dc:creator>
      <dc:date>2010-02-20T13:42:24Z</dc:date>
    </item>
  </channel>
</rss>

