<?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 question - ignoring OMP_NUM_THREADS? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940224#M89835</link>
    <description>&lt;P&gt;I use Intel Parallel Studio XE 2011 and Portland Group Fortran 12.1&amp;nbsp;&amp;nbsp;on Windows.&lt;/P&gt;
&lt;P&gt;I use Intel Composer_xe_2011 and Portland Group Fortran 10.x on Linux.&lt;/P&gt;
&lt;P&gt;I have a numerical hydrodynamic model that I an running with openMP on several computers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WINDOWS Observations&amp;nbsp; [Xeon W3570 4 core cpu]&amp;nbsp;&amp;nbsp;..&lt;/P&gt;
&lt;P&gt;1) Intel fortran compiles and links in openMP. Code runs with openMP and&amp;nbsp;yields a speedup of 1.43 with OMP_NUM_THREADS=8&lt;/P&gt;
&lt;P&gt;2) Portland group compiles and links in openMP. Code runs with openMP and&amp;nbsp;yields&amp;nbsp;a speedup of 1.4 with OMP_NUM_THREADS=8&lt;/P&gt;
&lt;P&gt;Summary: INTEL &amp;amp; PG BOTH WORK FINE ON WINDOWS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LINUX&amp;nbsp; Observations&amp;nbsp; - 2&amp;nbsp; machines&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Machine is a 4 processor AMD opteron 8360 SE with 4 cores per processor - 16 cores&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ) Intel fortran compiles and links in openMP.&amp;nbsp; Code does not run with more than one thread&amp;nbsp; with multiple OMP_NUM_THREADS&amp;nbsp;values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B) &amp;nbsp;Portland group compiles and links in openMP. I can run the code with openMP and get&amp;nbsp;a speedup of 1.38 with OMP_NUM_THREADS=12&lt;/P&gt;
&lt;P&gt;2) Machine has 4&amp;nbsp; Intel Xeon 6-core Xeon E5649 cpus. - 24 cores -&amp;nbsp;whoopie!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ) Intel fortran compiles and links in openMP.&amp;nbsp; Code does not run with more than one thread&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B) &amp;nbsp;Portland group compiles and links in openMP. I can run the code with openMP and get&amp;nbsp;a speedup of 1.44 with OMP_NUM_THREADS=12&lt;/P&gt;
&lt;P&gt;Summary:&amp;nbsp;&amp;nbsp;BOTH MACHINES EXHIBIT A PROBLEM WITH INTEL FORTRAN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem with Intel Fortran on Linux:&lt;/P&gt;
&lt;P&gt;I tried compiling and linking the code with Intel Fortran with both the dynamic openMP lib and the static openMP lib - both give just one thread running.&lt;/P&gt;
&lt;P&gt;I have varied OMP_NUM_THREADS from 1 through 18 on the Linux Xeon system - only get one thread running.&lt;/P&gt;
&lt;P&gt;Same behavior on the AMD system - varied OMP_NUM_THREADS from 1 through 16&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2012 02:09:28 GMT</pubDate>
    <dc:creator>Terry_Gerald</dc:creator>
    <dc:date>2012-11-02T02:09:28Z</dc:date>
    <item>
      <title>OpenMP question - ignoring OMP_NUM_THREADS?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940224#M89835</link>
      <description>&lt;P&gt;I use Intel Parallel Studio XE 2011 and Portland Group Fortran 12.1&amp;nbsp;&amp;nbsp;on Windows.&lt;/P&gt;
&lt;P&gt;I use Intel Composer_xe_2011 and Portland Group Fortran 10.x on Linux.&lt;/P&gt;
&lt;P&gt;I have a numerical hydrodynamic model that I an running with openMP on several computers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WINDOWS Observations&amp;nbsp; [Xeon W3570 4 core cpu]&amp;nbsp;&amp;nbsp;..&lt;/P&gt;
&lt;P&gt;1) Intel fortran compiles and links in openMP. Code runs with openMP and&amp;nbsp;yields a speedup of 1.43 with OMP_NUM_THREADS=8&lt;/P&gt;
&lt;P&gt;2) Portland group compiles and links in openMP. Code runs with openMP and&amp;nbsp;yields&amp;nbsp;a speedup of 1.4 with OMP_NUM_THREADS=8&lt;/P&gt;
&lt;P&gt;Summary: INTEL &amp;amp; PG BOTH WORK FINE ON WINDOWS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LINUX&amp;nbsp; Observations&amp;nbsp; - 2&amp;nbsp; machines&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Machine is a 4 processor AMD opteron 8360 SE with 4 cores per processor - 16 cores&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ) Intel fortran compiles and links in openMP.&amp;nbsp; Code does not run with more than one thread&amp;nbsp; with multiple OMP_NUM_THREADS&amp;nbsp;values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B) &amp;nbsp;Portland group compiles and links in openMP. I can run the code with openMP and get&amp;nbsp;a speedup of 1.38 with OMP_NUM_THREADS=12&lt;/P&gt;
&lt;P&gt;2) Machine has 4&amp;nbsp; Intel Xeon 6-core Xeon E5649 cpus. - 24 cores -&amp;nbsp;whoopie!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ) Intel fortran compiles and links in openMP.&amp;nbsp; Code does not run with more than one thread&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B) &amp;nbsp;Portland group compiles and links in openMP. I can run the code with openMP and get&amp;nbsp;a speedup of 1.44 with OMP_NUM_THREADS=12&lt;/P&gt;
&lt;P&gt;Summary:&amp;nbsp;&amp;nbsp;BOTH MACHINES EXHIBIT A PROBLEM WITH INTEL FORTRAN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem with Intel Fortran on Linux:&lt;/P&gt;
&lt;P&gt;I tried compiling and linking the code with Intel Fortran with both the dynamic openMP lib and the static openMP lib - both give just one thread running.&lt;/P&gt;
&lt;P&gt;I have varied OMP_NUM_THREADS from 1 through 18 on the Linux Xeon system - only get one thread running.&lt;/P&gt;
&lt;P&gt;Same behavior on the AMD system - varied OMP_NUM_THREADS from 1 through 16&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2012 02:09:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940224#M89835</guid>
      <dc:creator>Terry_Gerald</dc:creator>
      <dc:date>2012-11-02T02:09:28Z</dc:date>
    </item>
    <item>
      <title>You didn't say whether you</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940225#M89836</link>
      <description>You didn't say whether you set -omp-report or -opt-report to see whether the compiler implemented your omp parallel regions.  The options are spelled differently by pgf90 and ifort; in fact, the -mp option turns off optimizations when used in ifort (but doesn't disable OpenMP).</description>
      <pubDate>Fri, 02 Nov 2012 10:56:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940225#M89836</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-11-02T10:56:22Z</dc:date>
    </item>
    <item>
      <title>Didn't specify -omp-report or</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940226#M89837</link>
      <description>Didn't specify -omp-report or -opt-report.

I added -omp-report to my makefile - it caused an error - looks like the compiler "thinks" I am attempting to name the executable "mp-report"

I then tried -opt-report-file  - compiler generated an empty file.</description>
      <pubDate>Fri, 02 Nov 2012 15:13:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940226#M89837</guid>
      <dc:creator>Terry_Gerald</dc:creator>
      <dc:date>2012-11-02T15:13:16Z</dc:date>
    </item>
    <item>
      <title>Sorry, was not booted into</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940227#M89838</link>
      <description>Sorry, was not booted into linux at the time.  Please check compiler options by ifort -help ....
-openmp-report

Yes, those option are typo-prone.

I usually set something like -opt-report-file=$*_opt.txt in Makefile rules so the file is generated automatically.  An empty file means either that no compilation happened (target up to date) or nearly empty meaning you had -O0 set.  Anyway it doesn't look like -openmp is engaged if you don't see it when you turn on appropriate compiler echoes.</description>
      <pubDate>Fri, 02 Nov 2012 15:38:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940227#M89838</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-11-02T15:38:39Z</dc:date>
    </item>
    <item>
      <title>Mea Culpa</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940228#M89839</link>
      <description>Mea Culpa 

"Anyway it doesn't look like -openmp is engaged .."   


In case someone reads this from a google search...

Earlier I had a problem with using the dynamic openMP lib so I switched to using the static openMP lib.


My original makefile line:

 COMPILER_OPTS = -O3 -traceback  -fpp  -DPARALLEL_OMP -opt-report-file opt.info -Bstatic -openmp-link=static

What it should have been

 COMPILER_OPTS = -O3 -traceback  -fpp -openmp -DPARALLEL_OMP -opt-report-file opt.info -Bstatic -openmp-link=static



I ASSUMED that "-openmp-link=static" would enable openMP and also do a static link -- but all it does is specify the static openMP lib!

 Specifying  "-openmp-link=static"  does NOT enable openMP by itself!

Thanks guys, I am now running with multiple threads.</description>
      <pubDate>Fri, 02 Nov 2012 23:19:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/OpenMP-question-ignoring-OMP-NUM-THREADS/m-p/940228#M89839</guid>
      <dc:creator>Terry_Gerald</dc:creator>
      <dc:date>2012-11-02T23:19:20Z</dc:date>
    </item>
  </channel>
</rss>

