<?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: Basical problem with Fortran in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774404#M24266</link>
    <description>&lt;P&gt;Sorry for the delay, it was impossible to answer before.&lt;/P&gt;&lt;P&gt;ok Jugoslav let me explain the confussion then: when i posted this message maybe i was not enough clear. The idea of using threads were present(maybe you do not remember but i posted something close to it and you help me with another good subject about threads) but i was wondering if any other possibility was available.With your answer, it was clear the path to follow. And of course thanks for all the help.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2006 17:07:18 GMT</pubDate>
    <dc:creator>patuco</dc:creator>
    <dc:date>2006-04-17T17:07:18Z</dc:date>
    <item>
      <title>Basical problem with Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774400#M24262</link>
      <description>&lt;DIV&gt;Hi everyone,&lt;/DIV&gt;&lt;DIV&gt;i am asking for help due to my lack of acknowledge in Fortran, so if anyone could give me a hand, it would be perfect.&lt;/DIV&gt;&lt;DIV&gt;I had to create a Fortran library with some fortran subroutines(i did not implement them and even can change, so i am asking for help). The purpose was to create a java app to communicate with this lib, due to it calculates some values through different routines.&lt;/DIV&gt;&lt;DIV&gt;So the fortran program has a main subroutine:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;SUBROUTINE MLVG&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;which calls a subroutine which calculates everything using two global variables (DCOM and RDCOM)&lt;/DIV&gt;&lt;DIV&gt;The java interface calls somenatives that change the values ofthis variables, and get the values from the lib to show them on the screen,e.g.:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;SUBROUTINE CALLDEFA()&lt;BR /&gt;!MS$ATTRIBUTES DLLEXPORT,STDCALL,ALIAS:'_Calldefa@0'::CALLDEFA&lt;BR /&gt;INCLUDE 'COM_MASE.LVG'&lt;BR /&gt;DCOM ='DEFA'&lt;BR /&gt;END&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;So my problem, as you can imagine, is how can i do to stop the main subroutine and do nothing till the value of the global variables are changed by the natives.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I tryed with read and a while loop like, but it blocks the progrma till something is read, so the native call can not be done:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;SUBROUTINE MLVG&lt;/DIV&gt;&lt;DIV&gt;INCLUDE 'COMMON.LVG'&lt;/DIV&gt;&lt;DIV&gt;do while (.NOT.DCOM.EQ.'EXIT')&lt;BR /&gt;READ(*,'(A4,A72)',ERR=1,END=100)DCOM,RDCOM&lt;BR /&gt;&lt;BR /&gt;WRITE(*,*)' DEBUGGER COMANDO'&lt;BR /&gt;WRITE(*,*) DCOM&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;CALL COMLVG&lt;BR /&gt;DCOM= ''&lt;BR /&gt;RDCOM=''&lt;BR /&gt;enddo&lt;/DIV&gt;&lt;DIV&gt;END&lt;BR /&gt;&lt;BR /&gt;Please, if anyone has any suggestion?&lt;/DIV&gt;&lt;DIV&gt;Many Thanks&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Apr 2006 22:46:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774400#M24262</guid>
      <dc:creator>patuco</dc:creator>
      <dc:date>2006-04-06T22:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Basical problem with Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774401#M24263</link>
      <description>Unless you have more than one thread or process involved, the main routine &lt;B&gt;will&lt;/B&gt; wait until the called routine completes. In other words, any call to Native code will be modal unless there's an explicit thread creation somewhere. Is there?</description>
      <pubDate>Thu, 06 Apr 2006 23:19:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774401#M24263</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2006-04-06T23:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Basical problem with Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774402#M24264</link>
      <description>&lt;DIV&gt;Many thanks for the answer Jugoslav,&lt;/DIV&gt;&lt;DIV&gt;I thought and wad afraid for what you said, the neccesity of a thread implementation, because, as i commented before, i have no experience whith fortran, so i have no idea how to create a thread.&lt;/DIV&gt;&lt;DIV&gt;If anyone could recommend me a tutorial or somethig similar to implement it would be great.&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Apr 2006 15:07:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774402#M24264</guid>
      <dc:creator>patuco</dc:creator>
      <dc:date>2006-04-07T15:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Basical problem with Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774403#M24265</link>
      <description>Now I'm confused. In the first post you said that you don't know how to wait for the library to complete. After I said that it's the default behavior, now you tell me that you need a thread?&lt;BR /&gt;&lt;BR /&gt;You will need a thread only if the calculation takes a long time to complete. During that time, GUI will be stuck and the window cannot repaint itself.</description>
      <pubDate>Fri, 07 Apr 2006 22:49:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774403#M24265</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2006-04-07T22:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Basical problem with Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774404#M24266</link>
      <description>&lt;P&gt;Sorry for the delay, it was impossible to answer before.&lt;/P&gt;&lt;P&gt;ok Jugoslav let me explain the confussion then: when i posted this message maybe i was not enough clear. The idea of using threads were present(maybe you do not remember but i posted something close to it and you help me with another good subject about threads) but i was wondering if any other possibility was available.With your answer, it was clear the path to follow. And of course thanks for all the help.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2006 17:07:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Basical-problem-with-Fortran/m-p/774404#M24266</guid>
      <dc:creator>patuco</dc:creator>
      <dc:date>2006-04-17T17:07:18Z</dc:date>
    </item>
  </channel>
</rss>

