<?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 I've been using locks and in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974990#M9654</link>
    <description>I've been using locks and waits but by examining _KMP_launch (as in your enclosures), I still get waits of 200 ms after inserting:

iblock= KMP_SET_BLOCKTIME(1)
print *, "KMP BLOCK TIME= ",KMP_GET_BLOCKTIME(Iblock).

which gives me a report of  1ms.  I'm using MS Visual Studio and Fortran.  I assume that  
# export KMP_BLOCKTIME=20
# time ./matrix
has to do with C and linux?

Do I have to set the environment variable elsewhere?</description>
    <pubDate>Fri, 21 Dec 2012 21:23:16 GMT</pubDate>
    <dc:creator>Bruce_Weaver</dc:creator>
    <dc:date>2012-12-21T21:23:16Z</dc:date>
    <item>
      <title>Manualresetevents</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974985#M9649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We are converting a stochastic simulation fortran program to OpenMP as the outputs of the program can be summed.&amp;nbsp; In the simplest mode, we have just made the main loop a parallel region with firstprivate.&amp;nbsp; No matter how many threads we launch, the wall time consumed is roughly the time for a single thread times the number of threads.&amp;nbsp; The problem seems to be _kmp_launch_monitor which is having 200ms waits for ManualResetEvents.&amp;nbsp; Eliminating atomic and critical sections has little effect on the outcome.&amp;nbsp; Using OMP DO likewise.&lt;/P&gt;
&lt;P&gt;Reading a bit on ManualResetEvents has not helped.&amp;nbsp; Where should we be looking for the cause of the ManualResetEvents?&amp;nbsp; Can we make the wait time shorter?&amp;nbsp; Make them go away?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I gather that the launch monitor will always be there in an Intel OpenMP solution?&amp;nbsp; Otherwise the code is working as desired.&lt;/P&gt;
&lt;P&gt;thanks for any suggestions.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2012 19:53:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974985#M9649</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2012-12-17T19:53:36Z</dc:date>
    </item>
    <item>
      <title>You cannot reset parameters</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974986#M9650</link>
      <description>You cannot reset parameters of ManualResetEvent which is not exposed by OpenMP.
200ms is default value for infinite for a wait time of KMP_BLOCKTIME, You can export new value to change wait time.
Refer to &lt;A href="http://nf.nci.org.au/facilities/software/Compilers/Intel8/doc/f_ug2/par_var.htm" target="_blank"&gt;http://nf.nci.org.au/facilities/software/Compilers/Intel8/doc/f_ug2/par_var.htm&lt;/A&gt;, and you can search more via internet.</description>
      <pubDate>Tue, 18 Dec 2012 03:38:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974986#M9650</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-18T03:38:16Z</dc:date>
    </item>
    <item>
      <title>I changed the block time to</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974987#M9651</link>
      <description>I changed the block time to 1ms &amp;amp; it reported 1ms when I 'got' it.  But Vtune still shows 200ms. I've been running some small test programs and the auto-parallel is much faster thane the OpenMP parallel Do and very much faster than a just parallel region, even though all the threads are using cpu time but they seem very slow at their task.  It is made parallel but not speeding up.  This may be more of an Open MP problem than an Intel problem although I would like to try to have Vtune show what GET_KMP_BLOCKTIME says.</description>
      <pubDate>Tue, 18 Dec 2012 05:34:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974987#M9651</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2012-12-18T05:34:50Z</dc:date>
    </item>
    <item>
      <title>I used a small OpenMP example</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974988#M9652</link>
      <description>I used a small OpenMP example, and found that we can reduce wait time by changing KMP_BLOCKTIME value .

# export KMP_BLOCKTIME=200
# time ./matrix

real	0m3.806s
user	0m38.232s
sys	0m0.449s

# export KMP_BLOCKTIME=20
# time ./matrix

real	0m3.135s
user	0m33.910s
sys	0m0.082s</description>
      <pubDate>Wed, 19 Dec 2012 08:53:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974988#M9652</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-19T08:53:29Z</dc:date>
    </item>
    <item>
      <title>You can use locksandwaits</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974989#M9653</link>
      <description>You can use locksandwaits analysis to analyze, compare their results - wait time of _kmp_launch_monitor(). Using KMP_BLOCKTIME=200
took much wait time.</description>
      <pubDate>Thu, 20 Dec 2012 03:46:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974989#M9653</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-20T03:46:12Z</dc:date>
    </item>
    <item>
      <title>I've been using locks and</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974990#M9654</link>
      <description>I've been using locks and waits but by examining _KMP_launch (as in your enclosures), I still get waits of 200 ms after inserting:

iblock= KMP_SET_BLOCKTIME(1)
print *, "KMP BLOCK TIME= ",KMP_GET_BLOCKTIME(Iblock).

which gives me a report of  1ms.  I'm using MS Visual Studio and Fortran.  I assume that  
# export KMP_BLOCKTIME=20
# time ./matrix
has to do with C and linux?

Do I have to set the environment variable elsewhere?</description>
      <pubDate>Fri, 21 Dec 2012 21:23:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974990#M9654</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2012-12-21T21:23:16Z</dc:date>
    </item>
    <item>
      <title>You are right. I used C/C++</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974991#M9655</link>
      <description>You are right. I used C/C++ example code on Linux.

You might attach your fortran code which works on Windows - I might help to test it on my side.</description>
      <pubDate>Sat, 22 Dec 2012 05:27:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974991#M9655</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-22T05:27:10Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974992#M9656</link>
      <description>Hi,

All I have in this regard is:

iblock= KMP_SET_BLOCKTIME(1)
print *, "KMP BLOCK TIME= ",KMP_GET_BLOCKTIME(Iblock)

which, as I said, returns 1.  After that, there are about 2000 lines of code and comments, most of which is openMP.  I don't explicitly mess with environmental variables after these first two lines.  In using locks and waits, the KMP launch line shows 200 ms waits.</description>
      <pubDate>Sun, 23 Dec 2012 08:14:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974992#M9656</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2012-12-23T08:14:05Z</dc:date>
    </item>
    <item>
      <title>I just used a simple omp</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974993#M9657</link>
      <description>I just used a simple omp example Fortran code, named openmp_samlpes project from Intel Composer XE 2013 SP1.
I inserted -
call KMP_SET_BLOCKTIME(20), at begin
print *, ' KMP BLOCK TIME= ',KMP_GET_BLOCKTIME(), at end

Here are results:
 Range to check for Primes:           1    10000000
 We are using           4  thread(s)
 Number of primes found:      664579
 Number of 4n+1 primes found:      332181
 Number of 4n-1 primes found:      332398
 KMP BLOCK TIME=           20
Press any key to continue . . .</description>
      <pubDate>Mon, 24 Dec 2012 05:16:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974993#M9657</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-24T05:16:13Z</dc:date>
    </item>
    <item>
      <title>Hi Peter,</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974994#M9658</link>
      <description>Hi Peter,

Right; that is what I get too; now, what does Vtune tell you?</description>
      <pubDate>Mon, 24 Dec 2012 07:13:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974994#M9658</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2012-12-24T07:13:44Z</dc:date>
    </item>
    <item>
      <title>1. If I used "call KMP_SET</title>
      <link>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974995#M9659</link>
      <description>1. If I used "call KMP_SET_BLOCKTIME(2)"
Thread / Function / Call Stack	Wait Time by Utilization	Wait Count	Spin Time	Module	Function (Full)
__kmp_launch_monitor (0xbd4)	3.246s	17	0s		

2. If I used "call KMP_SET_BLOCKTIME(200)"
Thread / Function / Call Stack	Wait Time by Utilization	Wait Count	Spin Time	Module	Function (Full)
__kmp_launch_monitor (0x16e4)	3.319s	17	0s</description>
      <pubDate>Mon, 24 Dec 2012 09:22:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/Manualresetevents/m-p/974995#M9659</guid>
      <dc:creator>Peter_W_Intel</dc:creator>
      <dc:date>2012-12-24T09:22:24Z</dc:date>
    </item>
  </channel>
</rss>

