<?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 Hi Stan, in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993994#M3628</link>
    <description>Hi Stan,

If MPI_File_open were returning, you could use the return code to determine if the file exists or not.  Since your program isn't getting past MPI_File_open, you'll need to use a non-MPI mechanism to do this.  In C++, I would likely try to open the file (closing it immediately afterwards), as this is a portable method.  You can check the return values from the open attempt.  There are also non-portable methods that can check without opening the file.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools</description>
    <pubDate>Mon, 24 Sep 2012 15:08:53 GMT</pubDate>
    <dc:creator>James_T_Intel</dc:creator>
    <dc:date>2012-09-24T15:08:53Z</dc:date>
    <item>
      <title>MPI IO - simple question</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993993#M3627</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;How do I check&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if a file&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;exists and has been&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;successfully opened&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt; MPI::File::Open &lt;SPAN class="hps"&gt;function&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;suspends&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;my program.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Stan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 18:36:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993993#M3627</guid>
      <dc:creator>stansy</dc:creator>
      <dc:date>2012-09-23T18:36:41Z</dc:date>
    </item>
    <item>
      <title>Hi Stan,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993994#M3628</link>
      <description>Hi Stan,

If MPI_File_open were returning, you could use the return code to determine if the file exists or not.  Since your program isn't getting past MPI_File_open, you'll need to use a non-MPI mechanism to do this.  In C++, I would likely try to open the file (closing it immediately afterwards), as this is a portable method.  You can check the return values from the open attempt.  There are also non-portable methods that can check without opening the file.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools</description>
      <pubDate>Mon, 24 Sep 2012 15:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993994#M3628</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2012-09-24T15:08:53Z</dc:date>
    </item>
    <item>
      <title>Hi James,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993995#M3629</link>
      <description>Hi James,
Many thanks for the comprehensive answer. Because I use C + + interface I adopted  _access_s () function. I think it is safe:

MPI::File fin = MPI::FILE_NULL;

if(_access_s( fname, 0 ) == 0)   fin = MPI::File::Open(MPI::COMM_WORLD, fname, MPI::MODE_RDONLY, MPI::INFO_NULL);

if(fin != MPI::FILE_NULL){
               something, something ....
}

Width regards,
Stan</description>
      <pubDate>Mon, 24 Sep 2012 18:33:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-IO-simple-question/m-p/993995#M3629</guid>
      <dc:creator>stansy</dc:creator>
      <dc:date>2012-09-24T18:33:09Z</dc:date>
    </item>
  </channel>
</rss>

