<?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 NaN - another why question? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909311#M83023</link>
    <description>Me again (sorry)&lt;BR /&gt;&lt;BR /&gt;I have yet another issue - this time with parsing incoming data. &lt;BR /&gt;&lt;BR /&gt;Using&lt;BR /&gt;&lt;BR /&gt; EQUIVALENCE (FBUF(1),SFBUF)&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt; READ(DAFIL,'(780A1)',ERR=2) (FBUF(J),J=1,780) &lt;BR /&gt;&lt;BR /&gt;to get this line from a datafile&lt;BR /&gt;&lt;BR /&gt;0112VT.000 24.61 19.17 125 011BNL.000 NORTH SHORE CITY - 2001 0500-0700 LOADED NETWORK&lt;BR /&gt;&lt;BR /&gt;This read is correct&lt;BR /&gt;&lt;BR /&gt;But then we try to break it down with &lt;BR /&gt;&lt;BR /&gt;READ(SFBUF,149,ERR=2) (IDTRP(K,J),J=1,10), &lt;BR /&gt; *			CCPM(K), CCPK(K), LOLNK(K), HILNK(K),&lt;BR /&gt; *			(IDTIM(K,J),J=1,10), (CDESC(K,J),J=1,40),&lt;BR /&gt; *			CSEL(K)&lt;BR /&gt;149			FORMAT(10A1,5X,2F6.0,2I2,5X,10A1,5X,40A1,1X,A1)&lt;BR /&gt;&lt;BR /&gt;The values get correctly loaded in IDTRP (0112VT.000), CCPK(19.17), LOLNK(1) , HILNK(25) etc...&lt;BR /&gt;&lt;BR /&gt;But CCPM gets NaN, not 24.61&lt;BR /&gt; &lt;BR /&gt;And no error jump occurs&lt;BR /&gt;&lt;BR /&gt;The datafile appears correctly formatted - exact same file works fine with the same code compiled under MS Powerstation.&lt;BR /&gt;&lt;BR /&gt;What's going on here - am I missing something?&lt;BR /&gt;&lt;BR /&gt;Thankx again&lt;BR /&gt;&lt;BR /&gt;Jim &lt;BR /&gt;&lt;BR /&gt;Edit: Have just found the paste function on this forum reformated the pasted data line - so have uploded the original (assign.par) Line 6 is the line in question. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 19 Oct 2009 02:31:14 GMT</pubDate>
    <dc:creator>jim_cox</dc:creator>
    <dc:date>2009-10-19T02:31:14Z</dc:date>
    <item>
      <title>NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909311#M83023</link>
      <description>Me again (sorry)&lt;BR /&gt;&lt;BR /&gt;I have yet another issue - this time with parsing incoming data. &lt;BR /&gt;&lt;BR /&gt;Using&lt;BR /&gt;&lt;BR /&gt; EQUIVALENCE (FBUF(1),SFBUF)&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt; READ(DAFIL,'(780A1)',ERR=2) (FBUF(J),J=1,780) &lt;BR /&gt;&lt;BR /&gt;to get this line from a datafile&lt;BR /&gt;&lt;BR /&gt;0112VT.000 24.61 19.17 125 011BNL.000 NORTH SHORE CITY - 2001 0500-0700 LOADED NETWORK&lt;BR /&gt;&lt;BR /&gt;This read is correct&lt;BR /&gt;&lt;BR /&gt;But then we try to break it down with &lt;BR /&gt;&lt;BR /&gt;READ(SFBUF,149,ERR=2) (IDTRP(K,J),J=1,10), &lt;BR /&gt; *			CCPM(K), CCPK(K), LOLNK(K), HILNK(K),&lt;BR /&gt; *			(IDTIM(K,J),J=1,10), (CDESC(K,J),J=1,40),&lt;BR /&gt; *			CSEL(K)&lt;BR /&gt;149			FORMAT(10A1,5X,2F6.0,2I2,5X,10A1,5X,40A1,1X,A1)&lt;BR /&gt;&lt;BR /&gt;The values get correctly loaded in IDTRP (0112VT.000), CCPK(19.17), LOLNK(1) , HILNK(25) etc...&lt;BR /&gt;&lt;BR /&gt;But CCPM gets NaN, not 24.61&lt;BR /&gt; &lt;BR /&gt;And no error jump occurs&lt;BR /&gt;&lt;BR /&gt;The datafile appears correctly formatted - exact same file works fine with the same code compiled under MS Powerstation.&lt;BR /&gt;&lt;BR /&gt;What's going on here - am I missing something?&lt;BR /&gt;&lt;BR /&gt;Thankx again&lt;BR /&gt;&lt;BR /&gt;Jim &lt;BR /&gt;&lt;BR /&gt;Edit: Have just found the paste function on this forum reformated the pasted data line - so have uploded the original (assign.par) Line 6 is the line in question. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 02:31:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909311#M83023</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-19T02:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909312#M83024</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
What are the declarations for the various arrays, etc?&lt;BR /&gt;it appears that your read is correct for the attached data so it must be to some storage issue with the array that produces NaN.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:37:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909312#M83024</guid>
      <dc:creator>bmchenry</dc:creator>
      <dc:date>2009-10-19T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909313#M83025</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;EM&gt;0112VT.000 24.61 19.17 125 011BNL.000 NORTH SHORE CITY - 2001 0500-0700 LOADED NETWORK&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;149 FORMAT(10A1,5X,2F6.0,2I2,5X,10A1,5X,40A1,1X,A1)&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;10A1 = "&lt;EM&gt;0112VT.000"&lt;BR /&gt;&lt;/EM&gt;5X = "&lt;EM&gt; 24.6" &lt;BR /&gt;&lt;/EM&gt;2F6.0 = "&lt;EM&gt;1 19.1", "7 125 "&lt;BR /&gt;...&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;Reading CCMP would terminate on the space following 1st 1. I am not sure why the input does not span all 6 character positions of F6.0. Maybe that is part of "undefined behavior" or "defined behavior". Steve would know.&lt;BR /&gt;&lt;BR /&gt;Your problem is the 1st 5X. &lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 15:03:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909313#M83025</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-19T15:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909314#M83026</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;When the comma is read the read of the variable is ended due to an extension called "short field termination".&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 15:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909314#M83026</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-19T15:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909315#M83027</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;When the comma is read the read of the variable is ended due to an extension called "short field termination".&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Sorry? Which comma?&lt;BR /&gt;&lt;BR /&gt;How do switch the  "short field termination" off?&lt;BR /&gt;&lt;BR /&gt;Thankx&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;=mjc=&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 20:00:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909315#M83027</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-19T20:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909316#M83028</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Please ignore what I wrote previously - I misunderstood the situation. Let me look at it again and see what the issue Jim raised was.&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 20:26:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909316#M83028</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-19T20:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909317#M83029</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I constructed a test case based on what you showed and it works for me. Perhaps Jim miscounted characters. I don't see how one could get a NaN from a formatted READ, unless what you read was "NaN". Since you have shown us a fragment only and not a complete program, I'm left to conclude that what you have not shown us is important. The only odd thing is that the read of CDESC pulls in only part of what looks like a text string at the end of the record and CSEL just has a the N of "NETWORK".&lt;BR /&gt;&lt;BR /&gt;I've attached my test case. Please attach yours.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 20:45:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909317#M83029</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-19T20:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909318#M83030</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;I've attached my test case. Please attach yours.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Steve, please try the attached - I've cut down the original code as far as possible.&lt;BR /&gt;&lt;BR /&gt;Main routine is READTEST.F&lt;BR /&gt;&lt;BR /&gt;Problem is evident at line 377 of ASSPAM.F when it reads line 6 of ASSIGN.PAR when CCPM(1) comes back as NaN&lt;BR /&gt;&lt;BR /&gt;Hopefully I've included all the  .lib files needed to link.&lt;BR /&gt;&lt;BR /&gt;Set up is little tricky as the program will look for TRACKS.DAT and expects to write to SITE.TRX somewhere in the path.&lt;BR /&gt;&lt;BR /&gt;Expect the program to stop the end of asspam as I have not given you all the datafiles expected.&lt;BR /&gt;&lt;BR /&gt;Hopefully you can see the compiler settings I'm using&lt;BR /&gt;&lt;BR /&gt;Thankx yet again for your help&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Oct 2009 23:22:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909318#M83030</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-19T23:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909319#M83031</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Sorry - this is a bit more complex than I'm willing to look at at this point. You should be able to come up with a test case about the same size as mine.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Oct 2009 00:20:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909319#M83031</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-20T00:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909320#M83032</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Sorry - this is a bit more complex than I'm willing to look at at this point. You should be able to come up with a test case about the same size as mine.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Sorry I thought you wanted an example where the weirdness was actually happening.&lt;BR /&gt;&lt;BR /&gt;As it appears that minor changes to the program make a difference&lt;BR /&gt;&lt;BR /&gt;For example&lt;BR /&gt;&lt;BR /&gt;At line 83 in READTEST.F there is a call to a GAPINI routine  which checks the program licensing&lt;BR /&gt;&lt;BR /&gt;If I replace this call with GAPINI_FREE (no licence required) the ASSPAM read works correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Oct 2009 00:36:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909320#M83032</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-20T00:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909321#M83033</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I wanted a small test case that showed the problem. You have evidently discovered that you probably have a bug elsewhere in the program that is manifesting itself as the NaN. Perhaps you're accessing off the end of an array or have an argument mismatch, or something else. Your program is a mix of Fortran and C++ and may also be corrupting the stack with mismatched calling conventions. I have not studied it in detail to know. In any event, the issue is not directly related to the READ, which is why excerpts of programs are usually not helpful in analyzing problems.&lt;BR /&gt;&lt;BR /&gt;The usual course of action is to gradually remove parts of the program until you find a removal that changes the behavior. Then examine what you removed and look for problems. Watching variable locations in the debugger to see when they change is a useful tool.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Oct 2009 13:52:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909321#M83033</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-20T13:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909322#M83034</link>
      <description>You've answered your own question:&lt;BR /&gt;&amp;gt;At line 83 in READTEST.F there is a call to a GAPINI routine which checks the program licensing&lt;BR /&gt;&amp;gt;If I replace this call with GAPINI_FREE (no licence required) the ASSPAM read works correctly.&lt;BR /&gt;walk through with and without GAPINI. I am guessing something in GAPINI corrupts the memory storage location for the NaN variable.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Oct 2009 19:01:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909322#M83034</guid>
      <dc:creator>bmchenry</dc:creator>
      <dc:date>2009-10-20T19:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909323#M83035</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; I wanted a small test case that showed the problem. You have evidently discovered that you probably have a bug elsewhere in the program that is manifesting itself as the NaN. Perhaps you're accessing off the end of an array or have an argument mismatch, or something else. Your program is a mix of Fortran and C++ and may also be corrupting the stack with mismatched calling conventions.&lt;BR /&gt;...&lt;BR /&gt;The usual course of action is to gradually remove parts of the program until you find a removal that changes the behavior. Then examine what you removed and look for problems. Watching variable locations in the debugger to see when they change is a useful tool.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I would have hoped that argument mismatch and array bounds would be caught during compile or runtime. I'm not seeing any messages.&lt;BR /&gt;&lt;BR /&gt; C and C++ are compiled with _stdcall,  with iface CVF for the fortran, string length after each. The settings are the same as work on the current compiler. &lt;BR /&gt;&lt;BR /&gt;Stack corruption etc is getting past the edge of my experience as a (mostly) applications porgrammer. &lt;BR /&gt;&lt;BR /&gt;Its 'why wont this "known good" old  code run?' questions for me usually. Trying to jump it across two generations of copmpilers is certainally proving to be an "interesting learning experience" :(&lt;BR /&gt;&lt;BR /&gt;Looks like I'll need a 'Dummy's Guide to Intel Stack Debug"&lt;BR /&gt;&lt;BR /&gt;How do I  find the stack's base  memory location and the size ?&lt;BR /&gt;&lt;BR /&gt;Thankx for your help&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;=mjc=&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 20:00:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909323#M83035</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-21T20:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909324#M83036</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/93858"&gt;bmchenry&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;You've answered your own question:&lt;BR /&gt;&amp;gt;At line 83 in READTEST.F there is a call to a GAPINI routine which checks the program licensing&lt;BR /&gt;&amp;gt;If I replace this call with GAPINI_FREE (no licence required) the ASSPAM read works correctly.&lt;BR /&gt;walk through with and without GAPINI. I am guessing something in GAPINI corrupts the memory storage location for the NaN variable.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I'm not convinced that it is a corruption of the storage location of the ccpm array&lt;BR /&gt;&lt;BR /&gt;Yes, I can see that LOC(ccpm)  varies with the different compiles. 21479004 as against 21432988 &lt;BR /&gt;&lt;BR /&gt;In both cases the ccpm array is  specifically intiialised to 0.00 by the code. &lt;BR /&gt;&lt;BR /&gt;The array doesnt move,  the correct array entry is set.&lt;BR /&gt;&lt;BR /&gt;Apparently the   read returns either the correct 24.91 or NaN depending on which  code is included. The array is ciorrectly defined, and that same definition is used in both cases.&lt;BR /&gt;&lt;BR /&gt;But you can be sure I willl be examining all the differences between the GAPINI routines very very carefully&lt;BR /&gt;&lt;BR /&gt;Thankx for your input&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 20:35:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909324#M83036</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-21T20:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909325#M83037</link>
      <description>Not sure if this is better or just weirder&lt;BR /&gt;&lt;BR /&gt;Played with the differences between the gapini and gapini_free routines&lt;BR /&gt;&lt;BR /&gt;Removed all unused variables, turned on fp stack checking,  run timr warnings etc etc&lt;BR /&gt;&lt;BR /&gt;Trying isolating sections of code&lt;BR /&gt;&lt;BR /&gt;Found two library routines called GAPINI only&lt;BR /&gt;&lt;BR /&gt;Both these routines USE IFPORT and have a CALL RANDOM(ARND) where ARND is a locally defined real*4&lt;BR /&gt;&lt;BR /&gt;When I started playing with these - I started getting all sorts of 'odd' unhandled exceptions &lt;BR /&gt;&lt;BR /&gt;And some "error #6284: There is no matching specific function for this generic function reference"  compile messages&lt;BR /&gt;&lt;BR /&gt;But if I change it to       CALL RANDOM_NUMBER(ARND) it works - well at least as far as sorting the NaN problems I was seeing&lt;BR /&gt;&lt;BR /&gt;Go figure....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 00:38:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909325#M83037</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-22T00:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909326#M83038</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Restore the code to call RANDOM.&lt;BR /&gt;Place break point on call.&lt;BR /&gt;Open Memory Window to show ARND (and data that follows)&lt;BR /&gt;Then step over RANDOM&lt;BR /&gt;&lt;BR /&gt;Does location(s) following the 4 bytes of ARND get changed?&lt;BR /&gt;&lt;BR /&gt;This may indicate that a user supplied subroutine of the name RANDOM is being called as opposed to the runtime library named RANDOM.&lt;BR /&gt;&lt;BR /&gt;The runtime library RANDOM does have SAVE variables for state. These may be interacting with your license check routine in an adverse way. (intended or unintended).&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 16:41:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909326#M83038</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-22T16:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909327#M83039</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Restore the code to call RANDOM.&lt;BR /&gt;Place break point on call.&lt;BR /&gt;Open Memory Window to show ARND (and data that follows)&lt;BR /&gt;Then step over RANDOM&lt;BR /&gt;&lt;BR /&gt;Does location(s) following the 4 bytes of ARND get changed?&lt;BR /&gt;&lt;BR /&gt;This may indicate that a user supplied subroutine of the name RANDOM is being called as opposed to the runtime library named RANDOM.&lt;BR /&gt;&lt;BR /&gt;The runtime library RANDOM does have SAVE variables for state. These may be interacting with your license check routine in an adverse way. (intended or unintended).&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;I fear thiers is a good chance chance that this may have been the case. &lt;BR /&gt;&lt;BR /&gt;So I've gone through that area of code pretty hard - removed unused variables etc,. There were also a number of un-needed equivalences. There was also an instance of the editor finding a variable name to be a reserved word. &lt;BR /&gt;&lt;BR /&gt;Compiling IMPLICIT NONE is almost certainally  helping.&lt;BR /&gt;&lt;BR /&gt;It caught the follwoiing ugly implicit declaration of BUFF1&lt;BR /&gt;CHARACTER*1 DUM(80),BUFF(80)&lt;BR /&gt; EQUIVALENCE (BUFF(1),BUFF1)&lt;BR /&gt;which was one of the few declaration differences between my two code peices&lt;BR /&gt;&lt;BR /&gt;Wondering if the difference might have been a  program vs library debug dll issue, and seeing the retun as underflow - maybe. &lt;BR /&gt;&lt;BR /&gt;Where the symptomis are first seen can sure be miles away from the cause&lt;BR /&gt;&lt;BR /&gt;And ow have code that now runs to completion. &lt;BR /&gt;&lt;BR /&gt;So onwards to  output testing :)&lt;BR /&gt;&lt;BR /&gt;I wonder how stable it is?&lt;BR /&gt;&lt;BR /&gt;And a Happy Friday to all :)&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;=mjc=&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 20:02:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909327#M83039</guid>
      <dc:creator>jim_cox</dc:creator>
      <dc:date>2009-10-22T20:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909328#M83040</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Whoopieee!!!!&lt;BR /&gt;&lt;BR /&gt;Jim D.&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 04:23:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909328#M83040</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-23T04:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909329#M83041</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/308522"&gt;jim.cox&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
There was also an instance of the editor finding a variable name to be a reserved word. &lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;There are no reserved words in Fortran. It is perfectly OK to have a variable that is the same as a language keyword. In some cases it might be a bit confusing, but it is not an error.&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 13:19:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909329#M83041</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-23T13:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: NaN - another why question?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909330#M83042</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;There are no reserved words in Fortran. It is perfectly OK to have a variable that is the same as a language keyword. In some cases it might be a bit confusing, but it is not an error.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;??You mean I can redefine IF, GOTO, RETURN, SUBROUTINE, ...&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE FOO(IF)&lt;BR /&gt; INTEGER :: IF&lt;BR /&gt; IF = 12345&lt;BR /&gt;END SUBROUTINE FOO&lt;BR /&gt;&lt;BR /&gt;Is that valid?&lt;BR /&gt;&lt;BR /&gt;What about&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE FOO(IF)&lt;BR /&gt; INTEGER :: IF&lt;BR /&gt; IF(IF .eq. 0) IF = 12345&lt;BR /&gt;END SUBROUTINE FOO&lt;BR /&gt;&lt;BR /&gt;Where context (may) disambiguate the syntax.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 14:47:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/NaN-another-why-question/m-p/909330#M83042</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-23T14:47:33Z</dc:date>
    </item>
  </channel>
</rss>

