<?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 When I put -O2 on my fortran program, the answer is wrong. in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761043#M16530</link>
    <description>mecej4-san and Zitzlsberger-san,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;Until this issue is fixed, I put -O1 or -no-vec flag on check.f&lt;BR /&gt;&lt;BR /&gt;Zitzlsberger-san, thank you for creating defect ticket.&lt;BR /&gt;( It is necessary to ask engineer fixing compiler issue, isn't it?)&lt;BR /&gt;I will wait for your next information.&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;</description>
    <pubDate>Fri, 17 Feb 2012 09:04:03 GMT</pubDate>
    <dc:creator>amat000</dc:creator>
    <dc:date>2012-02-17T09:04:03Z</dc:date>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761036#M16523</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have attached 2 source files.&lt;BR /&gt;The correct answer is "N=2", but when I specify -O2 the answer is "N=1".&lt;BR /&gt;Could you check this behavior?&lt;BR /&gt;Compiler version : 12.1.1.256 Build 20111011&lt;BR /&gt;processor : X5690&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;&lt;BR /&gt;$ cat prog.f&lt;BR /&gt; program PROG&lt;BR /&gt; character*12 DDNAME,FILENM&lt;BR /&gt; common /PP/DDNAME(3),IFLSW,FILENM&lt;BR /&gt; integer N&lt;BR /&gt; DDNAME(2) = 'ABCDEF'&lt;BR /&gt; FILENM = 'ABCDEF'&lt;BR /&gt; IFLSW=1&lt;BR /&gt; CALL CHECK(N)&lt;BR /&gt; write(*,*) "N ",N&lt;BR /&gt; stop&lt;BR /&gt; end&lt;BR /&gt;&lt;BR /&gt;$ check.f&lt;BR /&gt; SUBROUTINE CHECK(N)&lt;BR /&gt; CHARACTER*12 DDNAME,FILENM&lt;BR /&gt; COMMON /PP/ DDNAME(3),IFLSW,FILENM&lt;BR /&gt; INTEGER N&lt;BR /&gt; N = 1&lt;BR /&gt; IF(IFLSW.EQ.0) RETURN&lt;BR /&gt; DO 10 I = 2 , 3&lt;BR /&gt; N = I&lt;BR /&gt; IF(FILENM(1:8).EQ.DDNAME(I)(1:8)) RETURN&lt;BR /&gt; 10 CONTINUE&lt;BR /&gt; STOP&lt;BR /&gt; END&lt;BR /&gt;&lt;BR /&gt; $ ifort -O0 *.f&lt;BR /&gt; $ ./a.out&lt;BR /&gt;N 2&lt;BR /&gt;&lt;BR /&gt; $ ifort *.f&lt;BR /&gt; $ ./a.out&lt;BR /&gt;N 1&lt;BR /&gt;&lt;BR /&gt; $ ifort -ipo *.f&lt;BR /&gt; $ ./a.out&lt;BR /&gt;N 2</description>
      <pubDate>Wed, 15 Feb 2012 11:00:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761036#M16523</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-02-15T11:00:38Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761037#M16524</link>
      <description>I don't run into this problem, using ifort 12.1.2 Intel64. Note that when you set up COMMON with implied misalignment by mixing storage units, the optimizer is likely to run into difficulty. Your source code looks like Fortran 77, except that mixing CHARACTER with other storage units in COMMON wasn't permitted in f77. &lt;BR /&gt;Also, leaving part of an array uninitialized is dangerous even though you may have initialized the bits which you access explicitly. Did you display the strings which you are accessing to see whether they were correctly blank filled?</description>
      <pubDate>Wed, 15 Feb 2012 12:26:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761037#M16524</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-02-15T12:26:36Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761038#M16525</link>
      <description>TimP-san,&lt;BR /&gt;&lt;BR /&gt;Thank you for your comment.&lt;BR /&gt;I understand my source code had mistakes, so I correct that.&lt;BR /&gt;I am afraid the wrong answer is still printed.&lt;BR /&gt;&lt;BR /&gt;Anyway, is 12.1.2 Intel64 released? I would like to use that compiler.&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;&lt;BR /&gt;New source codes&lt;BR /&gt;prog.f&lt;BR /&gt; program PROG&lt;BR /&gt; character*8 DDNAME,FILENM&lt;BR /&gt; common /P1/DDNAME(4),FILENM&lt;BR /&gt; common /P2/IFLSW&lt;BR /&gt; integer N&lt;BR /&gt; do i=1,4&lt;BR /&gt; DDNAME(i)= ' '&lt;BR /&gt; enddo&lt;BR /&gt; DDNAME(2) = 'ABCDEF'&lt;BR /&gt; FILENM = 'ABCDEF'&lt;BR /&gt; IFLSW=1&lt;BR /&gt; CALL CHECK(N)&lt;BR /&gt; write(*,*) "N ",N&lt;BR /&gt; stop&lt;BR /&gt; end&lt;BR /&gt;&lt;BR /&gt;check.f&lt;BR /&gt; SUBROUTINE CHECK(N)&lt;BR /&gt; CHARACTER*8 DDNAME,FILENM&lt;BR /&gt; COMMON /P1/ DDNAME(4),FILENM&lt;BR /&gt; COMMON /P2/ IFLSW&lt;BR /&gt; INTEGER N&lt;BR /&gt; N = 1&lt;BR /&gt; IF(IFLSW.EQ.0) RETURN&lt;BR /&gt; DO 10 I = 2 , 4&lt;BR /&gt; N = I&lt;BR /&gt; IF(FILENM(1:8).EQ.DDNAME(I)(1:8)) RETURN&lt;BR /&gt; 10 CONTINUE&lt;BR /&gt; STOP&lt;BR /&gt; END&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Feb 2012 04:18:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761038#M16525</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-02-16T04:18:13Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761039#M16526</link>
      <description>Compilers version 12.1.2 ("Update 8") were released in December. I do not see the reported errors with the Windows versions of this release.</description>
      <pubDate>Thu, 16 Feb 2012 04:31:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761039#M16526</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-16T04:31:35Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761040#M16527</link>
      <description>TimP-san,&lt;BR /&gt;&lt;BR /&gt;I am afraid Compiler 12.1.2.273 Linux version doesn't solve this issue.&lt;BR /&gt;&lt;BR /&gt;$ ifort -V&lt;BR /&gt;Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.2.273 Build 20111128&lt;BR /&gt;Copyright (C) 1985-2011 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;$ ifort prog.f check.f&lt;BR /&gt;$ ./a.out&lt;BR /&gt;N 1&lt;BR /&gt;$ ifort -O0 prog.f check.f&lt;BR /&gt;$ ./a.out&lt;BR /&gt;N 2&lt;BR /&gt;&lt;BR /&gt;What should I do next? Any comments will be appreciated.&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;Akiko MATSUMOTO</description>
      <pubDate>Thu, 16 Feb 2012 10:20:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761040#M16527</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-02-16T10:20:01Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761041#M16528</link>
      <description>I can duplicate the error in the revised code with the 64-bit version of the 12.1.2 compiler on Linux. The 32-bit compiler, same version, is not affected.&lt;BR /&gt;&lt;BR /&gt;Furthermore, the error can be localized to an optimizer bug when compiling the subroutine in file check.f, at optimization level 2 or higher. &lt;BR /&gt;&lt;BR /&gt;Curiously, at -O1 the produced code uses only the integer registers, whereas at -O2 the XMM registers are used.&lt;BR /&gt;&lt;BR /&gt;Until the bug is fixed, see if you can get by with compiling just check.f with -O1 and the rest of the code at your chosen optimization level.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Feb 2012 10:56:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761041#M16528</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-16T10:56:34Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761042#M16529</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I can reproduce your problem and high likely looks like a problem in our vectorizer (enabled with option "&lt;I&gt;-O2&lt;/I&gt;"). As a workaround I can offer you to use option "&lt;I&gt;-no-vec&lt;/I&gt;" (for selected compilation units) which turns off the vectorizer.&lt;BR /&gt;I'll create a defect ticket (edit: DPD200274990) to get this fixed and let you know when done.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Georg Zitzlsberger</description>
      <pubDate>Thu, 16 Feb 2012 14:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761042#M16529</guid>
      <dc:creator>Georg_Z_Intel</dc:creator>
      <dc:date>2012-02-16T14:27:00Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761043#M16530</link>
      <description>mecej4-san and Zitzlsberger-san,&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply.&lt;BR /&gt;Until this issue is fixed, I put -O1 or -no-vec flag on check.f&lt;BR /&gt;&lt;BR /&gt;Zitzlsberger-san, thank you for creating defect ticket.&lt;BR /&gt;( It is necessary to ask engineer fixing compiler issue, isn't it?)&lt;BR /&gt;I will wait for your next information.&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Feb 2012 09:04:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761043#M16530</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-02-17T09:04:03Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761044#M16531</link>
      <description>&lt;I&gt;&amp;gt; It is necessary to ask engineer fixing compiler issue, isn't it?&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;No; if you click on the small box "Subscribed to this Thread" at the top of this thread, you will be notified by E-mail when the bug is acted upon.&lt;BR /&gt;&lt;BR /&gt;An Intel person will update this thread, as well.&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:52:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761044#M16531</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-17T11:52:31Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761045#M16532</link>
      <description>I see.&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Feb 2012 12:24:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761045#M16532</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-02-17T12:24:14Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761046#M16533</link>
      <description>Hello Intel people,&lt;BR /&gt;&lt;BR /&gt;Could you tell me you have any uodate?&lt;BR /&gt;&lt;BR /&gt;Tanks,&lt;BR /&gt;Akiko MATSUMOTO&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Apr 2012 06:27:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761046#M16533</guid>
      <dc:creator>amat000</dc:creator>
      <dc:date>2012-04-20T06:27:17Z</dc:date>
    </item>
    <item>
      <title>When I put -O2 on my fortran program, the answer is wrong.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761047#M16534</link>
      <description>Matsumoto-san,&lt;BR /&gt;&lt;BR /&gt;I'm sorry to answer that late. I was waiting for the official verification whether DPD200274990 is fixed. Unfortunately there was a problem with our internal tracking system this time and I was not made aware that a fix has already been committed.&lt;BR /&gt;&lt;BR /&gt;However, I'm happy to tell you that &lt;SPAN style="text-decoration: underline;"&gt;Intel Composer XE 2011 Update 10&lt;/SPAN&gt; should work for you now.&lt;BR /&gt;&lt;BR /&gt;Thank you for your patience &amp;amp; best regards,&lt;BR /&gt;&lt;BR /&gt;Georg Zitzlsberger&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:06:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/When-I-put-O2-on-my-fortran-program-the-answer-is-wrong/m-p/761047#M16534</guid>
      <dc:creator>Georg_Z_Intel</dc:creator>
      <dc:date>2012-06-13T09:06:54Z</dc:date>
    </item>
  </channel>
</rss>

