<?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 Reserving a core for a thread in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811948#M43192</link>
    <description>I made an even slower example and ran it in release mode. Here is what happened:&lt;BR /&gt;&lt;BR /&gt;Loop count = number of threads = N&lt;BR /&gt;&lt;BR /&gt;Serial: 2.63 seconds&lt;BR /&gt;N = 1: 2.02&lt;BR /&gt;N = 2: 1.9&lt;BR /&gt;N = 4: 2.1&lt;BR /&gt;N = 8: 2.3&lt;BR /&gt;&lt;BR /&gt;Loop = 10, threads = 2: 1.9&lt;BR /&gt;Loop = 10, threads = 8: 2.3&lt;BR /&gt;Loop = 10, threads = 10: 2.15&lt;BR /&gt;&lt;BR /&gt;So the best case was using only two threads, not eight as I would have guessed. If I watch the Task Manager, I can see that, for this case, five of my eight cores were busy. Weird.</description>
    <pubDate>Wed, 06 Jun 2012 14:20:17 GMT</pubDate>
    <dc:creator>dondilworth</dc:creator>
    <dc:date>2012-06-06T14:20:17Z</dc:date>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811909#M43153</link>
      <description>My multi-threaded program works, but I find that running with several cores actually takes longer than does a single-thread run. Here's what is going on:&lt;BR /&gt;&lt;BR /&gt;1. Several threads are started. They each go into a DO WHILE loop, waiting for a flag in an indexed variable in a named COMMON block. &lt;BR /&gt;&lt;BR /&gt;2. When the flag is set, the thread starts some serious number crunching, using data taken from another indexed set of variables. When the routine finishes, it sets another flag, also in an indexed array.&lt;BR /&gt;&lt;BR /&gt;3. The calling program waits until all threads have finished, checking the flags in another DO WHILE loop, and then reads out the answers from the indexed variables. Then it starts over with another set of input data, and so on.&lt;BR /&gt;&lt;BR /&gt;This should run faster with several threads running in parallel, but it doesn't. Possible reasons:&lt;BR /&gt;&lt;BR /&gt;1. One of the threads is in a core being used by Windows for something else. It cannot complete its task until Windows lets it run, and the calling program has to wait for that.&lt;BR /&gt;&lt;BR /&gt;2. The several threads do not in fact run in parallel. If they go individually, that would also be very slow.&lt;BR /&gt;&lt;BR /&gt;Is there any way to ensure that my threads get their own cores, and they all run in parallel?</description>
      <pubDate>Thu, 31 May 2012 21:03:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811909#M43153</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-05-31T21:03:11Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811910#M43154</link>
      <description>Are you sure that your synchronisation method (spinning in a do while loop, waiting on a variable) works? Note that you'd need to look at the generated assembly in order to decide. I don't play at that low a level unless I've been a very bad boy, but inherently I doubt that you could write robust and efficient synchronisation methods in straight fortran (pre F2003) - typically there would be a call to an operating system API or some other library.&lt;BR /&gt;&lt;BR /&gt;Others have already done a lot of the hard work in this area - have a
 look at OpenMP (a good starting point if you have a threaded/shared 
memory view of the world) or coarrays (part of the standard Fortran 
language as of F2008).&lt;BR /&gt;&lt;BR /&gt;How are you starting your threads? How many are there? What sort of machine are you running on (how many real cores does it have)? What is the serious number crunching - are the threads trying to read from/write to the same variables?&lt;BR /&gt;</description>
      <pubDate>Thu, 31 May 2012 21:38:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811910#M43154</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2012-05-31T21:38:19Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811911#M43155</link>
      <description>Yes, it's a big issue. Threads are started with&lt;BR /&gt;&lt;BR /&gt;DO J = 1,ISFLAGS(171)    ! NUMBER TO AUTHORIZE &lt;BR /&gt;  ARG = -J     ! FLAG WHAT TO DO NEXT &lt;BR /&gt;  MTSTATUS(J) = 1    ! FLAG IS STARTED&lt;BR /&gt;  THREADHANDLE = CREATETHREAD (SECURITY,STACK,MTFUNCTION,ARG,FLAGS,THREAD_ID)&lt;BR /&gt;  IRETLOG = SETTHREADPRIORITY(THREADHANDLE,THREAD_PRIORITY_ABOVE_NORMAL)&lt;BR /&gt;&lt;BR /&gt;  IRETINT = RESUMETHREAD(THREADHANDLE)&lt;BR /&gt;  ITH = THREADHANDLE &lt;BR /&gt;  IF (ITH .EQ. 0) THEN&lt;BR /&gt;   ISFLAGS(171) = 0   ! DEFEAT ALTOGETHER&lt;BR /&gt;   CALL MPANIC('ERROR CREATING MULTIPLE THREADS')&lt;BR /&gt;   RETURN&lt;BR /&gt;  ENDIF&lt;BR /&gt;  ITHREADHANDLE(J) = ITH&lt;BR /&gt; ENDDO&lt;BR /&gt;&lt;BR /&gt;Each pass through this loop creates a thread that starts at the top of MTFUNCTION. That routine calls another, called DOMTRAYTRACE, which waits with a DO WHILE loop until flagged to start processing. My intent is that the latter program will execute in the thread (and in the core of the thread) which called it.&lt;BR /&gt;&lt;BR /&gt;The number of threads is constrained to be no more than the number of cores - 2. That leaves two for Windows to play with. So on my 8-core system there can be up to six.&lt;BR /&gt;&lt;BR /&gt;Each thread uses its own set of data, placed in an indexed array by the caller, plus its own automatic variables. So no thread directly changes any data used by any other thread.&lt;BR /&gt;&lt;BR /&gt;The number crunching involves tracing a light ray through a lens, and if there are many elements it takes a while. So if I want to trace 100 rays, I can start six of them running in parallel, collect the answers, start a new six, and so on. The right answers come back so each thread is doing its job with its own data.&lt;BR /&gt;&lt;BR /&gt;Every subroutine involved in the operation of the threads is compiled with &lt;BR /&gt;&lt;BR /&gt; USE IFMT&lt;BR /&gt; USE IFCORE&lt;BR /&gt;&lt;BR /&gt;which (I hope) makes it run in the same thread as its caller. I have looked for details of the two USE directives, so I would better know what I am doing. But those terms are not in the help file.&lt;BR /&gt;&lt;BR /&gt;The Windows Task Manager Performance tab shows my eight cores, normally most of them idle. When I start my threads, the requested number shoot up to nearly full utilization -- which is what you would expect from the DO WHILE loops. So it looks like they have started and are running as I planned.&lt;BR /&gt;&lt;BR /&gt;But how can I be sure that the routines called in each thread actually execute in the same core and in parallel? I am using IVF Composer XE 2011.&lt;BR /&gt;&lt;BR /&gt;In C++ one has the SetThreadAffinityMask() option to keep a thread in a single core. What does Fortran offer?&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2012 12:47:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811911#M43155</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-01T12:47:13Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811912#M43156</link>
      <description>Have you tried OpenMP?&lt;BR /&gt;&lt;BR /&gt;Using FPP, it should be relatively easy for you to experiment with the same source code compiled for OpenMP or for your threads system.&lt;BR /&gt;&lt;BR /&gt;Pseudo code:&lt;BR /&gt;&lt;BR /&gt;#ifndef _OPENMP&lt;BR /&gt; call createYourThreads()&lt;BR /&gt;#endif&lt;BR /&gt;do while(fetchRays())&lt;BR /&gt;#ifndef _OPENMP&lt;BR /&gt; call setYourGoFlags()&lt;BR /&gt; call waitForAllToFinish()&lt;BR /&gt;#else&lt;BR /&gt; !$omp parallel do&lt;BR /&gt; do i=1,nRays&lt;BR /&gt; call traceRay(i)&lt;BR /&gt;end do&lt;BR /&gt; !$omp end parallel do&lt;BR /&gt;#endif&lt;BR /&gt;end do&lt;BR /&gt;&lt;BR /&gt;Where traceRay(i) is calledin your curent code.&lt;BR /&gt;&lt;BR /&gt;I wouldn't worry about reserving one thread for Windows.&lt;BR /&gt;It will float from core to core.&lt;BR /&gt;&lt;BR /&gt;You can secify the number of threads for a parallel region in OpenMP.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Fri, 01 Jun 2012 13:05:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811912#M43156</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2012-06-01T13:05:36Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811913#M43157</link>
      <description>Jim:&lt;BR /&gt;&lt;BR /&gt;That's a good suggestion, but I have a question: I have implemented my common blocks for 10 cores, so I cannot do more than that number of loops in parallel. When the OpenMP parallel construct finishes, I collect the data from those 10, and then I presume the OS terminates all of the threads. Then for the next set, it has to create them all over again -- and the overhead then exceeds the savings. That is why I create the threads initially and then reuse them over and over.&lt;BR /&gt;&lt;BR /&gt;Does OpenMP do anything like that? I mean, create some threads and then reuse them over again? If your proposed traceRay() exits, then the thread evaporates, right?&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2012 16:18:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811913#M43157</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-01T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811914#M43158</link>
      <description>&lt;P&gt;SetThreadAffinityMask is a Win32 API function, not a C++ one so you can use it in Fortran.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 16:24:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811914#M43158</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2012-06-01T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811915#M43159</link>
      <description>OpenMP workswith a pool of threads.&lt;BR /&gt;&lt;BR /&gt;PROGRAM YourProgram&lt;BR /&gt; ... any data&lt;BR /&gt; ...&lt;BR /&gt; {optional calltoomp_... functionto query/set max threads}&lt;BR /&gt; ! the following is the 1st time OpenMP is called&lt;BR /&gt; !$OMP ...&lt;BR /&gt;{hidden code does once only allocation of thread pool}&lt;BR /&gt; {note, subsequent nested levels may add additional pool(s)}&lt;BR /&gt;&lt;BR /&gt;IOW the thread pool is created once (unless nested levels, and then only once again per nest level branch)&lt;BR /&gt;&lt;BR /&gt;Subsequent to the first time call, the threads get re-used as your code enters parallel regions.&lt;BR /&gt;&lt;BR /&gt;As your code exits a parallel region, there is an implicit join (unless parallel region exit is attributed with NOWAIT).&lt;BR /&gt;&lt;BR /&gt;Upon exit of parallel region, the (additional) threads either run something else in your application or failing having something else, enter a spinwait (default 100ms-300ms) and will resume immediately should you enter another parallel region. should the spinwait time exire before entering next parallel region, then thread suspends itself (but does not exit). You can change the spinwait time (KMP_BLOCKTIME environment variable or omp_set... library call).&lt;BR /&gt;&lt;BR /&gt;OpenMP should offer you everything you need (from what you describe).&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Fri, 01 Jun 2012 17:27:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811915#M43159</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2012-06-01T17:27:25Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811916#M43160</link>
      <description>For Intel OpenMP, the KMP_BLOCKTIME feature controls how long the thread pool persists after a parallel region is closed, default 200 (milliseconds). It's not a fully portable feature, although it's the same in all Intel OpenMP implementations.</description>
      <pubDate>Fri, 01 Jun 2012 17:27:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811916#M43160</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-06-01T17:27:44Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811917#M43161</link>
      <description>These are all very pertinent replies, and I'm exploring what OpenMP can do. I have implemented a version much like the example by Jim Dempsey, and it runs as it should -- but is also slower than the single-thread version. Then I checked the Task Manager, to watch how busy my eight cores are. Most of them were doing nothing, even though I supposedly ran the loop for 10 cores.&lt;BR /&gt;&lt;BR /&gt;So I probably need a directive to say how many cores to employ. I tried &lt;BR /&gt;&lt;BR /&gt;MT = OMP_GET_NUM_PROCS()&lt;BR /&gt;&lt;BR /&gt;and got a linker error. How does one get access to those functions? I want to be sure all my cores are running.</description>
      <pubDate>Fri, 01 Jun 2012 19:02:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811917#M43161</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-01T19:02:16Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811918#M43162</link>
      <description>Intel (and gnu) OpenMP default num_threads to the number of logical processors seen. omp_get_num_procs will work only with the USE OMP_LIB or equivalent. It will only confirm the number of logical processors, will not check or determine the number of threads running.  If you have HyperThreading, you should try setting OMP_NUM_THREADS so as to try not more than 1 thread per core, and set KMP_AFFINITY to spread out the threads across cores (e.g. KMP_AFFINITY=compact,1,1 or KMP_AFFINITY=scatter). It's quite difficult to get OpenMP performance from HyperThreading on Windows.&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2012 21:19:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811918#M43162</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-06-01T21:19:18Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811919#M43163</link>
      <description>&amp;gt;&amp;gt; is also slower than the single-thread version&lt;BR /&gt;&lt;BR /&gt;Can you post an outline of your code?&lt;BR /&gt;Include the OpenMP directives.&lt;BR /&gt;Include any code you wrote yourself for thread coordination&lt;BR /&gt;(it may still be in there from your prior coding attempt)&lt;BR /&gt;&lt;BR /&gt;I will be out over this weekend but others may help.&lt;BR /&gt;&lt;BR /&gt;Unless the work done in the parallel section is very short&lt;BR /&gt;(or you are calling functions performing serialization: allocate/deallocate, rand, R/W, ...)&lt;BR /&gt;the OpenMP version should be faster.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Fri, 01 Jun 2012 22:03:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811919#M43163</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2012-06-01T22:03:27Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811920#M43164</link>
      <description>Okay, here's an outline:&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE TRANS(JRET)&lt;BR /&gt; USE IFMT&lt;BR /&gt; USE IFCORE&lt;BR /&gt;  USE OMP_LIB&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt; INDEX = 1&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;c NP = omp_get_num_procs() (This causes a link error:&lt;BR /&gt;&lt;BR /&gt;error LNK2019: unresolved external symbol _omp_get_num_procs referenced in function _TRANS&lt;BR /&gt;&lt;BR /&gt;so it is commented out.)&lt;BR /&gt;&lt;BR /&gt;9499 (generate individual ray starting data)&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;IF (INDEX .LE. NCORES) THEN  ! START THREAD  &lt;BR /&gt;  ISFLAGS(177) = INDEX&lt;BR /&gt;  CALL ZASABR(JERR,IPRT,IOPD,ICAO,XEN,YEN,HBAR,MX,ICOL,OPD,D2,GBAR)  ! LOAD INPUT DATA THERE&lt;BR /&gt;  &lt;BR /&gt;   IF (INDEX .EQ. NCORES) THEN   ! ALL LOADED; TRACE RAYS NOW&lt;BR /&gt;    !$OMP PARALLEL DO&lt;BR /&gt; &lt;BR /&gt;    DO I = 1,INDEX &lt;BR /&gt;     CALL MTRAYTRACE(I) ! gets data from the indexed array filled by ZASABR()&lt;BR /&gt;    ENDDO&lt;BR /&gt; &lt;BR /&gt;    !$OMP END PARALLEL DO&lt;BR /&gt;    GO TO 8801  ! read out results and process them sequentially; then set INDEX = 1, start over at 9499&lt;BR /&gt;   ENDIF&lt;BR /&gt;  &lt;BR /&gt;  INDEX = INDEX + 1 ! can start yet more threads immediately&lt;BR /&gt;  GO TO 9499   ! SET UP NEXT RAY; comes back in above&lt;BR /&gt; ENDIF&lt;BR /&gt;&lt;BR /&gt;There are two problems: first, why can't I link the omp_... routine? Is there another library I have to declare to the linker? Second, why are many of my cores idle?</description>
      <pubDate>Fri, 01 Jun 2012 22:56:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811920#M43164</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-01T22:56:25Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811921#M43165</link>
      <description>I've checked the Threads window in the debugger, and before I call any of the OMP routines, there is a Main Thread and two Worker Threads. After I get to the first !$OMP PARALLEL DO, the same three threads show up. I would expect as many threads as I have cores. Clearly, the OpenMP feature is not working.&lt;BR /&gt;&lt;BR /&gt;In case it's useful, here are the command lines for Fortran and the linker:&lt;BR /&gt;&lt;BR /&gt;/nologo /debug:full /debug:parallel /Oy- /I"Debug/" /recursive /reentrancy:none /extend_source:132 /warn:none /Qauto /align:rec4byte /align:commons /assume:byterecl /Qzero /fpconstant /iface:cvf /module:"Debug/" /object:"Debug/" /Fd"Debug\vc100.pdb" /traceback /check:all /libs:dll /threads /winapp /c&lt;BR /&gt;&lt;BR /&gt;/OUT:".\Debug\SYNOPSYS200v14.exe" /VERSION:"14.0" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\\compiler\lib\ia32" /LIBPATH:"C:\Projects\U105136\OpenGL\freeglut 2.4.0 (compiled)" /LIBPATH:"C:\SYNOPSYSV14\Libraries(x64)\Static\MT" "mpr.lib" "SentinelKeys.lib" "wsock32.lib" "freeglut.lib" "Debug\SYNOPSYS200_lib_.lib" /NODEFAULTLIB:"LIBCMT.lib" /NODEFAULTLIB:"msvcrtd.lib" /NODEFAULTLIB:"msvcrt.lib" /MANIFEST /ManifestFile:".\Debug\SYNOPSYS200v14.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pdb" /SUBSYSTEM:WINDOWS /STACK:"3000000" /PGD:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE &lt;BR /&gt;</description>
      <pubDate>Sat, 02 Jun 2012 12:12:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811921#M43165</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-02T12:12:45Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811922#M43166</link>
      <description>Progress! I found a page that says I have to add VCOMPD.lib to the linker input. Now I can use the omp_... routines -- but I still don't get more than the usual three threads, even after the !$OMP PARALLEL DO.&lt;BR /&gt;&lt;BR /&gt;So something's still wrong.</description>
      <pubDate>Sat, 02 Jun 2012 12:19:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811922#M43166</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-02T12:19:35Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811923#M43167</link>
      <description>Yes, I'm a newbe, and I didn't know about linking the library VCOMPD.lib, and also setting the compiler options to recognize the omp_ calls. So I got most things working: it makes lots of threads and they all run when I get to the !$OMP PARALLEL DO statement. So far, so good. And the code comes back with the right answers.&lt;BR /&gt;&lt;BR /&gt;But here are my timing specs:&lt;BR /&gt;&lt;BR /&gt;serial mode: 0.371 seconds&lt;BR /&gt;10 cores, 10 passes in the DO loop each sequence, which is run about 985 times: 0.546 seconds.&lt;BR /&gt;&lt;BR /&gt;It's hard to believe there is so much overhead in the OpenMP routines. There is some added work in my code, of course; there are 36 assignment statements associated with each core going into the calculation, and several hundred coming out. But if I run a simpler problem, where the calculations are faster but the overhead is the same, I get&lt;BR /&gt;&lt;BR /&gt;serial: 0.156&lt;BR /&gt;10 cores: 0.215&lt;BR /&gt;&lt;BR /&gt;So the overhead has to be no more than 0.059 seconds, even if the parallel execution was exactly the same speed as the serial. None of this makes sense.&lt;BR /&gt;&lt;BR /&gt;Is there lots of overhead just triggering each pass through a given thread? That might do it.</description>
      <pubDate>Sat, 02 Jun 2012 15:15:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811923#M43167</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-02T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811924#M43168</link>
      <description>If you didn't set /Qopenmp (there's a prominent option in Visual Studio GUI as well), your OpenMP directives should be reported with warnings. That would explain your failure to link libiomp5, thus your omp calls won't be resolved.</description>
      <pubDate>Sat, 02 Jun 2012 15:49:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811924#M43168</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-06-02T15:49:10Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811925#M43169</link>
      <description>As Tim said, you need to set the option /Qopenmp. It is under Fortran 
&amp;gt; Language &amp;gt; Process OpenMP Directives in the properties menu. 
Without this option, the openmp directives will be ignored.&lt;BR /&gt;</description>
      <pubDate>Sat, 02 Jun 2012 16:53:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811925#M43169</guid>
      <dc:creator>Anonymous66</dc:creator>
      <dc:date>2012-06-02T16:53:40Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811926#M43170</link>
      <description>I've made some real progress. I now have the debug version running my eight cores with eight threads, and my test case runs 1.56x faster with multithreads enabled than it does in serial mode. A key point was to not enable recursive routines and not generate reentrant code. (This by dumb trial-and-error, since I have not seen that information given anywhere.) This is great news!&lt;BR /&gt;&lt;BR /&gt;But the release version still runs 1.6x &lt;I&gt;slower&lt;/I&gt; in multithread mode, and I don't know why. Here are the command lines:&lt;BR /&gt;&lt;BR /&gt;DEBUG: 1.56X FASTER&lt;BR /&gt;&lt;BR /&gt;F&lt;BR /&gt;&lt;BR /&gt;/nologo /debug:full /debug:parallel /Oy- /I"Debug/" /reentrancy:none /extend_source:132 /Qopenmp /Qopenmp-report1 /warn:none /Qauto /align:rec4byte /align:commons &lt;BR /&gt;&lt;BR /&gt;/assume:byterecl /Qzero /fpconstant /iface:cvf /module:"Debug/" /object:"Debug/" /Fd"Debug\vc100.pdb" /traceback /check:all /libs:dll /threads /winapp /c&lt;BR /&gt;&lt;BR /&gt;C++&lt;BR /&gt;&lt;BR /&gt;/ZI /nologo /W1 /WX- /Od /Ot /Oy- /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0600" /Gm /EHsc /MTd /GS /Gy- /fp:precise /Zc:wchar_t /Zc:forScope /Fp".\Debug&lt;BR /&gt;&lt;BR /&gt;\SYNOPSYS200.pch" /Fa".\Debug" /Fo".\Debug" /Fd".\Debug" /FR".\Debug" /Gd /analyze- /errorReport:queue &lt;BR /&gt;&lt;BR /&gt;Linker&lt;BR /&gt;&lt;BR /&gt;/OUT:".\Debug\SYNOPSYS200v14.exe" /VERSION:"14.0" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\\compiler\lib\ia32" /LIBPATH:"C:\Projects&lt;BR /&gt;&lt;BR /&gt;\U105136\OpenGL\freeglut 2.4.0 (compiled)" /LIBPATH:"C:\SYNOPSYSV14\Libraries(x64)\Static\MT" "mpr.lib" "SentinelKeys.lib" "wsock32.lib" "freeglut.lib" "Debug&lt;BR /&gt;&lt;BR /&gt;\SYNOPSYS200_lib_.lib" "VCOMPD.LIB" /NODEFAULTLIB:"LIBCMT.lib" /NODEFAULTLIB:"msvcrtd.lib" /NODEFAULTLIB:"msvcrt.lib" /MANIFEST /ManifestFile:".\Debug&lt;BR /&gt;&lt;BR /&gt;\SYNOPSYS200v14.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pdb" &lt;BR /&gt;&lt;BR /&gt;/SUBSYSTEM:WINDOWS /STACK:"3000000" /PGD:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;RELEASE: 1.6X SLOWER&lt;BR /&gt;&lt;BR /&gt;F&lt;BR /&gt;&lt;BR /&gt;/nologo /Oy- /Qipo /I"Release/" /reentrancy:none /extend_source:132 /Qopenmp /Qauto /align:rec4byte /align:commons /assume:byterecl /Qzero /fpconstant /iface:cvf &lt;BR /&gt;&lt;BR /&gt;/module:"Release/" /object:"Release/" /Fd"Release\vc100.pdb" /check:none /libs:dll /threads /winapp /c&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C++&lt;BR /&gt;&lt;BR /&gt;/Zi /nologo /W2 /WX- /O2 /Ot /Oy- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0600" /GF /Gm- /EHsc /MT /GS /Gy- /fp:precise /Zc:wchar_t /Zc:forScope /GR /openmp &lt;BR /&gt;&lt;BR /&gt;/Fp".\Release\SYNOPSYS200.pch" /Fa".\Release" /Fo".\Release" /Fd".\Release" /FR".\Release" /Gd /analyze- /errorReport:queue &lt;BR /&gt;&lt;BR /&gt;Linker&lt;BR /&gt;&lt;BR /&gt;/OUT:".\Release\SYNOPSYS200v14.exe" /VERSION:"14.0" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2011 SP1\\compiler\lib\ia32" /LIBPATH:"C:&lt;BR /&gt;&lt;BR /&gt;\SYNOPSYSV14\OpenGL\freeglut 2.4.0 (compiled)" /LIBPATH:"C:\SYNOPSYSV14\Libraries(x64)\Static\MT" "ODBC32.LIB" "ODBCCP32.LIB" "mpr.lib" "SentinelKeys.lib" "wsock32.lib" &lt;BR /&gt;&lt;BR /&gt;"freeglut.lib" "VCOMP.lib" "Release\SYNOPSYS200_lib_.lib" /NODEFAULTLIB:"LIBCMTd.lib" /NODEFAULTLIB:"msvcrtd.lib" /NODEFAULTLIB:"msvcrt.lib" /MANIFEST /ManifestFile:".\Release&lt;BR /&gt;&lt;BR /&gt;\SYNOPSYS200v14.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\SYNOPSYSV14\Release\SYNOPSYS200v14.pdb" /SUBSYSTEM:WINDOWS &lt;BR /&gt;&lt;BR /&gt;/STACK:"3000000" /PGD:"C:\SYNOPSYSV14\Release\SYNOPSYS200v14.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE &lt;BR /&gt;</description>
      <pubDate>Sun, 03 Jun 2012 11:45:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811926#M43170</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-03T11:45:52Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811927#M43171</link>
      <description>Do you need the option /fp:precise in C++? This will disable a number of optimizations.&lt;BR /&gt;&lt;BR /&gt;Also, is there a reason you are using /iface:cvf in Fortran? Are you calling libraries compiled with CVF?</description>
      <pubDate>Sun, 03 Jun 2012 15:05:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811927#M43171</guid>
      <dc:creator>Anonymous66</dc:creator>
      <dc:date>2012-06-03T15:05:18Z</dc:date>
    </item>
    <item>
      <title>Reserving a core for a thread</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811928#M43172</link>
      <description>I need the /iface directive. The program was converted from CVF, and although there are no libraries compiled there, I have calling conventions built in all over the place that require that option. The /fp directive results in floating-point answers that are nearly the same as the CVF version, while the other options are often quite different.&lt;BR /&gt;&lt;BR /&gt;I'm not sure the issue is optimization anyway. The program runs faster than the CVF version, even in serial mode. The issue is, why I cannot get the OpenMP services to work in release mode as well as in debug mode. The latter seems to work fine, and I get faster results running parallel than serial. But the release version runs more slowly in parallel mode than in serial, which suggests that it is actually running the parallel DO loop in serial, with extra overhead slowing it down even more.&lt;BR /&gt;&lt;BR /&gt;So that's the problem. Can you think of any way to fix it?</description>
      <pubDate>Sun, 03 Jun 2012 15:54:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reserving-a-core-for-a-thread/m-p/811928#M43172</guid>
      <dc:creator>dondilworth</dc:creator>
      <dc:date>2012-06-03T15:54:08Z</dc:date>
    </item>
  </channel>
</rss>

