<?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 OpenMP related I/O error  in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749756#M6559</link>
    <description>I am running a numerical model in "dm+sm" parallel mode on a cluster with 64 bit linux OS which has more than 2 nodes and  16 cpus per node.  The compilation of the model with "dm+sm" seemed successful.&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I set  OMP_NUM_THREADS to 2 or greater , the model was terminated with an error message :&lt;/DIV&gt;&lt;DIV&gt;forrtl: severe (40): recursive I/O operation, unit 0, file unknown
&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I set OMP_NUM_THREADS to 1, which acctually disabled the openmp function, the model ran successfully.&lt;/DIV&gt;&lt;DIV&gt;Please help me out. Thanks a lot !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Below is my PBS job file:
&lt;/DIV&gt;&lt;DIV&gt;#!/bin/csh&lt;/DIV&gt;&lt;DIV&gt;#PBS -l nodes=2:ppn=8&lt;/DIV&gt;&lt;DIV&gt;#PBS -m ae&lt;/DIV&gt;&lt;DIV&gt;setenv OMP_NUM_THREADS 2&lt;/DIV&gt;&lt;DIV&gt;time mpirun wrf.csh&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;where "Wrf.csh" unlimits the stacksize and executes the model as follows:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#!/bin/csh&lt;/DIV&gt;&lt;DIV&gt;limit stacksize unlimited&lt;/DIV&gt;&lt;DIV&gt;exec wrf.exe&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 12 Oct 2010 21:39:27 GMT</pubDate>
    <dc:creator>thornpig</dc:creator>
    <dc:date>2010-10-12T21:39:27Z</dc:date>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749756#M6559</link>
      <description>I am running a numerical model in "dm+sm" parallel mode on a cluster with 64 bit linux OS which has more than 2 nodes and  16 cpus per node.  The compilation of the model with "dm+sm" seemed successful.&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I set  OMP_NUM_THREADS to 2 or greater , the model was terminated with an error message :&lt;/DIV&gt;&lt;DIV&gt;forrtl: severe (40): recursive I/O operation, unit 0, file unknown
&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I set OMP_NUM_THREADS to 1, which acctually disabled the openmp function, the model ran successfully.&lt;/DIV&gt;&lt;DIV&gt;Please help me out. Thanks a lot !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Below is my PBS job file:
&lt;/DIV&gt;&lt;DIV&gt;#!/bin/csh&lt;/DIV&gt;&lt;DIV&gt;#PBS -l nodes=2:ppn=8&lt;/DIV&gt;&lt;DIV&gt;#PBS -m ae&lt;/DIV&gt;&lt;DIV&gt;setenv OMP_NUM_THREADS 2&lt;/DIV&gt;&lt;DIV&gt;time mpirun wrf.csh&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;where "Wrf.csh" unlimits the stacksize and executes the model as follows:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#!/bin/csh&lt;/DIV&gt;&lt;DIV&gt;limit stacksize unlimited&lt;/DIV&gt;&lt;DIV&gt;exec wrf.exe&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Oct 2010 21:39:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749756#M6559</guid>
      <dc:creator>thornpig</dc:creator>
      <dc:date>2010-10-12T21:39:27Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749757#M6560</link>
      <description>Is your file I/O context held in Thread Local Storage?&lt;BR /&gt;&lt;BR /&gt;Locate in your code where (you suspect) the erronious I/O statement is located. Insert some diagnostic code&lt;BR /&gt;&lt;BR /&gt;!$OMP CRITICAL&lt;BR /&gt;WRITE(*,*) 'Debug IO ', omp_get_thread_num()&lt;BR /&gt;bSomeError = .false.&lt;BR /&gt;(your I/O statement(s) here)&lt;BR /&gt;goto 12345&lt;BR /&gt;(your I/O error code here)&lt;BR /&gt;bSomeError = .true.&lt;BR /&gt;12345 continue&lt;BR /&gt;!$OMP END CRITICAL&lt;BR /&gt;if(bSomeError) goto (your error lable here)&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Wed, 13 Oct 2010 17:18:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749757#M6560</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-13T17:18:47Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749758#M6561</link>
      <description>The "recursion" in thisparticular error message sometimes means that an error occurred during a write to stdout/stderr, and so when the RTL tries to write a diagnostic to the same unit, it is considerd as a recursive use of that unit. But it might indicate an error or thread safety issue on some other unit.&lt;BR /&gt;&lt;BR /&gt;Along the same lines as Jim's suggestion, you should make sure that you are linking to the threadsafe version of the Fortran RTL. This should happen automatically if you use the compiler driver to link and have -openmp on the link line. But if you link to the OpenMP library explicitly, then you may need to put -threads on the link line, or link to libifcoremt instead of libifcore.</description>
      <pubDate>Fri, 15 Oct 2010 22:46:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749758#M6561</guid>
      <dc:creator>Martyn_C_Intel</dc:creator>
      <dc:date>2010-10-15T22:46:48Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749759#M6562</link>
      <description>Thank you Jim and Martyn!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I am trying to figure out your suggestions and will give you feedback later.&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2010 15:52:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749759#M6562</guid>
      <dc:creator>thornpig</dc:creator>
      <dc:date>2010-10-20T15:52:38Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749760#M6563</link>
      <description>I gotsimilarproblem to run WRF model compiled by intel compiler with openmp. wrf.exe can run with omp_num_threads=1, but get same error when omp_num_threads&amp;gt;1. However, when I use gfortran/gcc to compile this model with openmp, it can run successfully when omp_num_threads&amp;gt;1. any clue? thanks.</description>
      <pubDate>Wed, 27 Oct 2010 23:20:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749760#M6563</guid>
      <dc:creator>Yongjia_S_</dc:creator>
      <dc:date>2010-10-27T23:20:06Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749761#M6564</link>
      <description>One other thing to look at is:&lt;BR /&gt;&lt;BR /&gt;Does your I/O statement(s) within the parallel region(s) attept to transfer outside the parallel region (on error, eof, ...)?&lt;BR /&gt;&lt;BR /&gt;It is not valid to do so. (place these branch targets inside the parallel region)&lt;BR /&gt;The compiler should warn of this coding error.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Oct 2010 04:21:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749761#M6564</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-28T04:21:37Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749762#M6565</link>
      <description>I don't undersand the mean in Jim's code. what is "(your I/O statement(s) here)" and "(your I/O error code here)", are they same io sentence I suspect in my program? what is "(your error lable here)"? thanks.</description>
      <pubDate>Thu, 28 Oct 2010 20:18:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749762#M6565</guid>
      <dc:creator>Yongjia_S_</dc:creator>
      <dc:date>2010-10-28T20:18:02Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749763#M6566</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1288297173954="63" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=188965" href="https://community.intel.com/en-us/profile/188965/" class="basic"&gt;yongjia.song@gmail.com&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;I don't undersand the mean in Jim's code. what is "(your I/O statement(s) here)" and "(your I/O error code here)", are they same io sentence I suspect in my program? what is "(your error lable here)"? thanks.&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;!$OMP PARALLEL&lt;BR /&gt; ...&lt;BR /&gt; READ(YourInUnit, 100, err=999, end=888) arglist&lt;BR /&gt; 100 FORMAT(...)&lt;BR /&gt; ...&lt;BR /&gt; GOTO 12345&lt;BR /&gt;! error label&lt;BR /&gt;! *** MUST reside within sameparallel region of READ(..., err=label)&lt;BR /&gt;999ErrorFlag = .true.&lt;BR /&gt; GOTO 12345 ! to label at end of parallel region&lt;BR /&gt;! *** MUST reside within sameparallel region of READ(..., end=label)&lt;BR /&gt;888 EndFlag = .true.&lt;BR /&gt; GOTO 12345&lt;BR /&gt; ...&lt;BR /&gt;12345 CONTINUE&lt;BR /&gt;!$OMP END PARALLEL&lt;BR /&gt; if(ErrorFlag) GOTO 9999&lt;BR /&gt; if(EndFlag) GOTO 8888&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;The labels 999 and 888 are dispatched to froma READ statementwithin the parallel region and therefore must reside within the same parallel region. Following the exit of the parallel region, test for end and/or error conditions.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;"A structured block of code is a collection of one or more executable statements with a single point of entry at the top and a single point of exit at the bottom."&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;I hope this clears up the issue.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2010 20:36:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749763#M6566</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-10-28T20:36:40Z</dc:date>
    </item>
    <item>
      <title>OpenMP related I/O error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749764#M6567</link>
      <description>Thanks, Jim, I understand now.</description>
      <pubDate>Thu, 28 Oct 2010 22:39:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-related-I-O-error/m-p/749764#M6567</guid>
      <dc:creator>Yongjia_S_</dc:creator>
      <dc:date>2010-10-28T22:39:47Z</dc:date>
    </item>
  </channel>
</rss>

