<?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 Issue in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-Issue/m-p/882059#M3361</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a code with multiple modules and I am trying to parallelize it using -Qopenmp option with Intel Fortran V10.1.014 Compiler Integration for Microsoft Visual Studio 2005. For testing purposes, I have inserted the following section:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;Module xxxx&lt;BR /&gt;&lt;BR /&gt;Use Module a&lt;BR /&gt;Use Module b&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;Contains&lt;BR /&gt;&lt;BR /&gt;Subroutine xxx&lt;BR /&gt;&lt;BR /&gt;Lots of variable Declarations&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;nTHREAD = 2 ! set the number of threads&lt;BR /&gt;CALL OMP_SET_NUM_THREADS(nTHREAD) ! Call OMP func to set number of threads&lt;BR /&gt;!&lt;BR /&gt;print*,OMP_GET_MAX_THREADS(),OMP_GET_NUM_THREADS()&lt;BR /&gt;!$OMP PARALLEL DEFAULT(SHARED)&lt;BR /&gt;!$OMP DO&lt;BR /&gt;DO j = 1, 10&lt;BR /&gt; WRITE(*,*) 'Thread', OMP_GET_THREAD_NUM(), ' index is ', j&lt;BR /&gt;END DO&lt;BR /&gt;!$OMP END DO&lt;BR /&gt;!$OMP END PARALLEL&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;Lots of Do and Do while nested loops and lots of code......&lt;BR /&gt;&lt;BR /&gt;End Subroutine xx&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Other Subroutines.........&lt;BR /&gt;&lt;BR /&gt;End Module xxxx&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;I have set following compiler options:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000080"&gt;/nologo /Zi /Od /GB /Qpar_threshold:0 /reentrancy /gen-interfaces /Qopenmp /Qopenmp_report:2 /Qpar_report:3 /Qvec_report:5 /Qdiag-enable:sv3 /Qdiag-file:"Debug2_2 with intel.diag" /warn:all /iface:cvf /module:"Debug" /object:"Debug" /traceback /check:bounds /check:uninit /libs:static /threads /dbglibs /c&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;I get following build error and I do not get any parallelization:&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;remark: An internal threshold was exceeded: loops may not be vectorized or parallelized. Try to reduce routine size&lt;BR /&gt;
remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Why I am getting this error? I am not trying to parallelize all of the loops but only 1 loop. I am compiling this code on single processor machine. I noticed that the above error is not due to presence of do while loop but only when I put a specific variable calculations in it. For example:&lt;BR /&gt;&lt;BR /&gt;The following does not give the above error:&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;lots of code..&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Do while (i.le.n)&lt;BR /&gt;&lt;BR /&gt;i=i+1&lt;BR /&gt;End Do while&lt;BR /&gt;..&lt;BR /&gt;lots of code&lt;/FONT&gt;&lt;BR /&gt;But this does:&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#000080"&gt;lots of code..&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
Do while (i.le.n)&lt;BR /&gt;&lt;BR /&gt;var1(i,j)=var2(i,j)&lt;BR /&gt;&lt;BR /&gt;
i=i+1&lt;BR /&gt;
End Do while&lt;BR /&gt;
..&lt;BR /&gt;
lots of code&lt;/FONT&gt;
&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;Ragini&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
    <pubDate>Tue, 27 May 2008 19:03:46 GMT</pubDate>
    <dc:creator>rza101</dc:creator>
    <dc:date>2008-05-27T19:03:46Z</dc:date>
    <item>
      <title>OpenMP Issue</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-Issue/m-p/882059#M3361</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a code with multiple modules and I am trying to parallelize it using -Qopenmp option with Intel Fortran V10.1.014 Compiler Integration for Microsoft Visual Studio 2005. For testing purposes, I have inserted the following section:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;Module xxxx&lt;BR /&gt;&lt;BR /&gt;Use Module a&lt;BR /&gt;Use Module b&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;Contains&lt;BR /&gt;&lt;BR /&gt;Subroutine xxx&lt;BR /&gt;&lt;BR /&gt;Lots of variable Declarations&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;nTHREAD = 2 ! set the number of threads&lt;BR /&gt;CALL OMP_SET_NUM_THREADS(nTHREAD) ! Call OMP func to set number of threads&lt;BR /&gt;!&lt;BR /&gt;print*,OMP_GET_MAX_THREADS(),OMP_GET_NUM_THREADS()&lt;BR /&gt;!$OMP PARALLEL DEFAULT(SHARED)&lt;BR /&gt;!$OMP DO&lt;BR /&gt;DO j = 1, 10&lt;BR /&gt; WRITE(*,*) 'Thread', OMP_GET_THREAD_NUM(), ' index is ', j&lt;BR /&gt;END DO&lt;BR /&gt;!$OMP END DO&lt;BR /&gt;!$OMP END PARALLEL&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;Lots of Do and Do while nested loops and lots of code......&lt;BR /&gt;&lt;BR /&gt;End Subroutine xx&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Other Subroutines.........&lt;BR /&gt;&lt;BR /&gt;End Module xxxx&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;I have set following compiler options:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000080"&gt;/nologo /Zi /Od /GB /Qpar_threshold:0 /reentrancy /gen-interfaces /Qopenmp /Qopenmp_report:2 /Qpar_report:3 /Qvec_report:5 /Qdiag-enable:sv3 /Qdiag-file:"Debug2_2 with intel.diag" /warn:all /iface:cvf /module:"Debug" /object:"Debug" /traceback /check:bounds /check:uninit /libs:static /threads /dbglibs /c&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;I get following build error and I do not get any parallelization:&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;remark: An internal threshold was exceeded: loops may not be vectorized or parallelized. Try to reduce routine size&lt;BR /&gt;
remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Why I am getting this error? I am not trying to parallelize all of the loops but only 1 loop. I am compiling this code on single processor machine. I noticed that the above error is not due to presence of do while loop but only when I put a specific variable calculations in it. For example:&lt;BR /&gt;&lt;BR /&gt;The following does not give the above error:&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;lots of code..&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Do while (i.le.n)&lt;BR /&gt;&lt;BR /&gt;i=i+1&lt;BR /&gt;End Do while&lt;BR /&gt;..&lt;BR /&gt;lots of code&lt;/FONT&gt;&lt;BR /&gt;But this does:&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#000080"&gt;lots of code..&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
Do while (i.le.n)&lt;BR /&gt;&lt;BR /&gt;var1(i,j)=var2(i,j)&lt;BR /&gt;&lt;BR /&gt;
i=i+1&lt;BR /&gt;
End Do while&lt;BR /&gt;
..&lt;BR /&gt;
lots of code&lt;/FONT&gt;
&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;Ragini&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 27 May 2008 19:03:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-Issue/m-p/882059#M3361</guid>
      <dc:creator>rza101</dc:creator>
      <dc:date>2008-05-27T19:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP Issue</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-Issue/m-p/882060#M3362</link>
      <description>&lt;P&gt;If you are interested in cleaning up the diagnostics, don't use par_threshold and par_report options when you want only OpenMP threading. If those options do anything without /Qparallel, their result is likely to be bogus, and I have doubts about their use with /Od as well. You wouldn't need to specify reentrancy or threadsin addition to /Qopenmp or /Qparallel. I don't have a clue what you mean by /GB. What you have quoted are only warnings, and there is an indication that your OpenMP parallel compilation has been accomplished as directed. Your warnings may be produced by the combination of invoking parallel diagnostics with your do while loop structures. OpenMP and Qparallel work better with plain old counted DO loops.&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2008 23:30:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OpenMP-Issue/m-p/882060#M3362</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-05-27T23:30:24Z</dc:date>
    </item>
  </channel>
</rss>

