<?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 Re: What should I do in multithreading if I change from x32 to  in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/What-should-I-do-in-multithreading-if-I-change-from-x32-to-x64/m-p/862200#M69469</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Please repost this in the Fortran for Windows forum.&lt;BR /&gt;&lt;BR /&gt;Also, try changing the types for your handles to HANDLE as opposed to integer(4)&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
    <pubDate>Tue, 07 Jul 2009 20:56:50 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2009-07-07T20:56:50Z</dc:date>
    <item>
      <title>What should I do in multithreading if I change from x32 to x64 in VSF</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/What-should-I-do-in-multithreading-if-I-change-from-x32-to-x64/m-p/862199#M69468</link>
      <description>hi&lt;BR /&gt; What should I do in multithreading if I change from x32 to x64 in Visual studio Fortran. I've tried a simple multithread test program under win32 platform and it runs well. However, it cannot pass the build process if I change the configuration to X64 platform. I will appreciate if anybody could give some help, thanks&lt;BR /&gt;&lt;BR /&gt;here is my test code:&lt;BR /&gt;&lt;BR /&gt; use IFMT&lt;BR /&gt; external threadfunc&lt;BR /&gt; PARAMETER(mTHREAD=2)&lt;BR /&gt; common /thread/A(2,10000)&lt;BR /&gt;&lt;BR /&gt; integer(4) para(mThread)&lt;BR /&gt; integer hthread(mthread),idthread(mthread),hticketmutex&lt;BR /&gt; logical(4) waitall&lt;BR /&gt; integer(4) nresult,nwaitresult,nticket&lt;BR /&gt; common /ticket/nticket&lt;BR /&gt; common/mutex/hticketmutex&lt;BR /&gt;&lt;BR /&gt; NTICKET=1&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;I&gt; HTICKETMUTEX=CREATEMUTEX(0,.FALSE.,0)&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt; WAITALL=.TRUE.&lt;BR /&gt; DO I=1,mTHREAD&lt;BR /&gt; para(i)=i&lt;BR /&gt; &lt;I&gt;&lt;B&gt; HTHREAD(I)=CREATETHREAD(0,0,THREADFUNC,loc(para(i)),0,IDTHREAD(I))&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt; END DO &lt;BR /&gt; NWAITRESULT=WAITFORMULTIPLEOBJECTS(mTHREAD,HTHREAD(1),WAITALL,&lt;BR /&gt; &amp;amp;   WAIT_INFINITE)&lt;BR /&gt; &lt;BR /&gt; LOU=CLOSEHANDLE(hTicketMutex)&lt;BR /&gt;&lt;BR /&gt; DO IJ=1,mTHREAD&lt;BR /&gt; LOU=CLOSEHANDLE(HTHREAD(IJ))&lt;BR /&gt; IF(LOU.EQ.0) THEN&lt;BR /&gt; PRINT *,'FAIL TO CLOSE HANDLES HTHREAD'&lt;BR /&gt; STOP&lt;BR /&gt; END IF&lt;BR /&gt; END DO&lt;BR /&gt; DO I=1,4&lt;BR /&gt; WRITE(*,*) A(1,I),A(2,I)&lt;BR /&gt; END DO&lt;BR /&gt; PAUSE&lt;BR /&gt; STOP&lt;BR /&gt; END&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;integer(4) function threadfunc(arg)&lt;/B&gt;&lt;BR /&gt; use IFMT&lt;BR /&gt; PARAMETER(mTHREAD=2)&lt;BR /&gt;&lt;BR /&gt; common /thread/A(2,10000)&lt;BR /&gt;&lt;BR /&gt; integer(4) arg&lt;BR /&gt; integer hticketmutex&lt;BR /&gt; logical(4) waitall&lt;BR /&gt; integer(4) nresult,nwaitresult,nticket&lt;BR /&gt; common /ticket/nticket&lt;BR /&gt; common/mutex/hticketmutex&lt;BR /&gt;&lt;BR /&gt; nwaitresult=waitforsingleobject(hticketmutex,WAIT_INFINITE)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; K1=NTICKET&lt;BR /&gt;&lt;BR /&gt; nticket=nticket+1&lt;BR /&gt; &lt;BR /&gt; DO I=1,10000&lt;BR /&gt; A(K1,I)=I*K1&lt;BR /&gt; END DO&lt;BR /&gt;&lt;BR /&gt; threadfunc = 0&lt;BR /&gt; end function  &lt;BR /&gt;&lt;BR /&gt;Error 1 error #6284: There is no matching specific function for this generic function reference. [CREATEMUTEX] C:\jiang\Multithread tests\mt\mtest.FOR 16 &lt;BR /&gt;Error 2 error #6284: There is no matching specific function for this generic function reference. [CREATETHREAD] C:\jiang\Multithread tests\mt\mtest.FOR 20 &lt;BR /&gt;&lt;BR /&gt;these codes work well under 32bit configurartion. Does it mean I need to use some different functions (such as CREATEMUTEX, CREATETHREAD) or change the configuration in project properties under X64 platform?&lt;BR /&gt; thanks again&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2009 16:38:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/What-should-I-do-in-multithreading-if-I-change-from-x32-to-x64/m-p/862199#M69468</guid>
      <dc:creator>jiang_2009</dc:creator>
      <dc:date>2009-07-07T16:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: What should I do in multithreading if I change from x32 to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/What-should-I-do-in-multithreading-if-I-change-from-x32-to-x64/m-p/862200#M69469</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Please repost this in the Fortran for Windows forum.&lt;BR /&gt;&lt;BR /&gt;Also, try changing the types for your handles to HANDLE as opposed to integer(4)&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2009 20:56:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/What-should-I-do-in-multithreading-if-I-change-from-x32-to-x64/m-p/862200#M69469</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-07-07T20:56:50Z</dc:date>
    </item>
  </channel>
</rss>

