<?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: odd Seg fault location in Large program in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758573#M14060</link>
    <description>&lt;BR /&gt;Ok. Next steps then. We need specifics about the OS (Linux or Mac OS X?), your architecture, and compiler version (-V).&lt;BR /&gt;&lt;BR /&gt;I didn't catch this earlier. The Segv occurs inside the Fortran RTLs, which trapped the error.The earlier article contains remedies for faults within user code.&lt;BR /&gt;&lt;BR /&gt;We need to see the code since it is likely we'll need our Fortran RTL developers help.&lt;BR /&gt;&lt;BR /&gt;This is a public forum so if you are not comfortable uploading the code/input data to this post, then open a newIntel Premier issue (&lt;A href="https://premier.intel.com/" target="_blank"&gt;here&lt;/A&gt;) and request it be assigned to me. I'll gladly dig into this.&lt;BR /&gt;&lt;BR /&gt;If you are not already using our latest 11.1 release, there's perhaps a chance a newer compiler may offer a remedy too.&lt;BR /&gt;</description>
    <pubDate>Tue, 01 Sep 2009 18:32:36 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2009-09-01T18:32:36Z</dc:date>
    <item>
      <title>odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758570#M14057</link>
      <description>First of all I apologize for this post. The code here is part of an 800+ line program and I am not going to post the whole thing. Also, usually I would try to isolate the error but for some reason it does not happen in the runs before the error appears. IOW since this error is within a DO loop, the section of code that seems to be producing the error has been repeated 15+ times before showing up. &lt;BR /&gt; &lt;BR /&gt;There are print statements in the code that I used to figure out how far the program got before the error happens. The seg fault and prints were reported as such:&lt;BR /&gt; HERE4&lt;BR /&gt; HERE2&lt;BR /&gt; HERE7&lt;BR /&gt; HERE8&lt;BR /&gt; HERE9&lt;BR /&gt; HERE10&lt;BR /&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred&lt;BR /&gt;Image              PC        Routine            Line        Source             &lt;BR /&gt;thor1              080643B7  track_module_mp_t         738  track0.1.f90&lt;BR /&gt;thor1              08050248  MAIN__                    185  thor0.52.f90&lt;BR /&gt;thor1              0804ECD1  Unknown               Unknown  Unknown&lt;BR /&gt;libc.so.6          00978E8C  Unknown               Unknown  Unknown&lt;BR /&gt;thor1              0804EBC1  Unknown               Unknown  Unknown&lt;BR /&gt;&lt;BR /&gt;The line pointed to by traceback is label below. The odd thing I see is that the prints make it to 10 which is far away and outside the statement where the seg fault occurs. The statement where the seg fault occurs is contained within a DO loop that ends and is not returned to until much later. Even then It would print a number lower than 10. I am not sure how to find out what is going on and how to fix it. I hope this made sense. I guess in summation the seg fault occued inside a do loop while the program seemed to be outside that do loop. &lt;BR /&gt;Any ideas? How can I figure out what is wrong with the program? Would a debugger be helpful?&lt;BR /&gt;&lt;BR /&gt;[Main Program]&lt;BR /&gt;&lt;BR /&gt;DO q=1,tracksubset&lt;BR /&gt; print *, "HERE1"&lt;BR /&gt; i = 0&lt;BR /&gt; r = 0&lt;BR /&gt; DO&lt;BR /&gt; i = i + 1&lt;BR /&gt; r = r + 1&lt;BR /&gt; print *, "HERE2"&lt;BR /&gt; IF (r &amp;gt; maxslices .OR. i &amp;gt; maxcellsintrack) EXIT&lt;BR /&gt; IF (temptrack(q,i,r,1) /= 0.0) THEN &amp;lt;--- Seg Fault Error Here&lt;BR /&gt; stormmotion(q) = temptrack(q,1,r,2)/temptrack(q,1,r,3)&lt;BR /&gt; print *, "HERE3"&lt;BR /&gt; ELSE&lt;BR /&gt; print *, "HERE4"&lt;BR /&gt; i = i - 1&lt;BR /&gt; END IF&lt;BR /&gt; END DO&lt;BR /&gt;&lt;BR /&gt; IF (q &amp;gt; 1) THEN&lt;BR /&gt; print *, "HERE5"&lt;BR /&gt; &lt;BR /&gt; IF (stormmotion(q) &amp;lt;= stormmotion(tracksubset+1)) THEN&lt;BR /&gt; stormmotion(tracksubset+1) = stormmotion(q)&lt;BR /&gt; stormmotion(tracksubset+2) = q&lt;BR /&gt; print *, "HERE6"&lt;BR /&gt; END IF&lt;BR /&gt; ELSE&lt;BR /&gt; stormmotion(tracksubset+1) = stormmotion(q)&lt;BR /&gt; stormmotion(tracksubset+2) = q&lt;BR /&gt; print *, "HERE7"&lt;BR /&gt; END IF&lt;BR /&gt; &lt;BR /&gt; print *, "HERE8"&lt;BR /&gt;END DO&lt;BR /&gt;&lt;BR /&gt;print *, "HERE9"&lt;BR /&gt; &lt;BR /&gt;IF (stormmotion(tracksubset+1) /= 0.0) THEN&lt;BR /&gt; WRITE(30,*) "Track",track&lt;BR /&gt; WRITE(30,*) "MeanError",stormmotion(tracksubset+1)&lt;BR /&gt; t = 0&lt;BR /&gt; s = 0&lt;BR /&gt; DO&lt;BR /&gt; t = t + 1&lt;BR /&gt; s = s + 1&lt;BR /&gt; IF (s &amp;gt; maxslices .OR. t &amp;gt; maxcellsintrack) EXIT&lt;BR /&gt; IF (temptrack(INT(stormmotion(tracksubset+2)),t,s,1) /= 0.0) THEN            cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),9) = 1&lt;BR /&gt; CALL epoch_to_time (INT(cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),1)),slicetime)&lt;BR /&gt; WRITE(30,*) slicetime(1:13),INT(temptrack(INT(stormmotion(tracksubset+2)),t,s,1)),cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),2),cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),3),INT(cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),4)),cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),5),cellinfo(s,temptrack(INT(stormmotion(tracksubset+2)),t,s,1),6)&lt;BR /&gt; &lt;BR /&gt; ELSE&lt;BR /&gt; t = t - 1&lt;BR /&gt; END IF&lt;BR /&gt; END DO&lt;BR /&gt; &lt;BR /&gt;ELSE&lt;BR /&gt; print *, "HERE10"&lt;BR /&gt; track = track - 1&lt;BR /&gt;END IF&lt;BR /&gt; &lt;BR /&gt;print *, "HERE11"&lt;BR /&gt; &lt;BR /&gt;if (allocated(stormmotion)) Deallocate(stormmotion)&lt;BR /&gt;if (allocated(temptrack)) Deallocate(temptrack)&lt;BR /&gt;close(40)&lt;BR /&gt;&lt;BR /&gt;[Closing Arguments]                        &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 16:45:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758570#M14057</guid>
      <dc:creator>deadpickle</dc:creator>
      <dc:date>2009-09-01T16:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758571#M14058</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Possibly relates to stack temps. Have a look at Ron's advice in this Knowledge Base article (&lt;A href="http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/" target="_blank"&gt;here&lt;/A&gt;). Probably -heap-arrays may help or up-ing the shell stack limit.</description>
      <pubDate>Tue, 01 Sep 2009 17:07:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758571#M14058</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-09-01T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758572#M14059</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/335337"&gt;Kevin Davis (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;Possibly relates to stack temps. Have a look at Ron's advice in this Knowledge Base article (&lt;A href="http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors/" target="_blank"&gt;here&lt;/A&gt;). Probably -heap-arrays may help or up-ing the shell stack limit.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Thanks for the advice!&lt;BR /&gt;&lt;BR /&gt;I went ahead and tried:&lt;BR /&gt; 
&lt;UL&gt;
&lt;LI&gt;-check bounds&lt;/LI&gt;
&lt;LI&gt;I already use -traceback&lt;/LI&gt;
&lt;LI&gt;-heap-arrays&lt;/LI&gt;
&lt;LI&gt;unlimit stacksize&lt;/LI&gt;
&lt;LI&gt;-check arg_temp_created&lt;/LI&gt;
&lt;/UL&gt;
None of these have shown anything new, still getting the same seg fault with the same location. I am reluctant to send this program in since its size is very large. To compile the program you need 10 modules and a series of input data. So it seems unreasonable for me to send it in as the last tip hints at. Would using a debugger shine any light on this problem or have I gotten all I can from this? I would send it if I had to but it would take a little while.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 18:02:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758572#M14059</guid>
      <dc:creator>deadpickle</dc:creator>
      <dc:date>2009-09-01T18:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758573#M14060</link>
      <description>&lt;BR /&gt;Ok. Next steps then. We need specifics about the OS (Linux or Mac OS X?), your architecture, and compiler version (-V).&lt;BR /&gt;&lt;BR /&gt;I didn't catch this earlier. The Segv occurs inside the Fortran RTLs, which trapped the error.The earlier article contains remedies for faults within user code.&lt;BR /&gt;&lt;BR /&gt;We need to see the code since it is likely we'll need our Fortran RTL developers help.&lt;BR /&gt;&lt;BR /&gt;This is a public forum so if you are not comfortable uploading the code/input data to this post, then open a newIntel Premier issue (&lt;A href="https://premier.intel.com/" target="_blank"&gt;here&lt;/A&gt;) and request it be assigned to me. I'll gladly dig into this.&lt;BR /&gt;&lt;BR /&gt;If you are not already using our latest 11.1 release, there's perhaps a chance a newer compiler may offer a remedy too.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 18:32:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758573#M14060</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-09-01T18:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758574#M14061</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/335337"&gt;Kevin Davis (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;Ok. Next steps then. We need specifics about the OS (Linux or Mac OS X?), your architecture, and compiler version (-V).&lt;BR /&gt;&lt;BR /&gt;I didn't catch this earlier. The Segv occurs inside the Fortran RTLs, which trapped the error.The earlier article contains remedies for faults within user code.&lt;BR /&gt;&lt;BR /&gt;We need to see the code since it is likely we'll need our Fortran RTL developers help.&lt;BR /&gt;&lt;BR /&gt;This is a public forum so if you are not comfortable uploading the code/input data to this post, then open a newIntel Premier issue (&lt;A href="https://premier.intel.com/" target="_blank"&gt;here&lt;/A&gt;) and request it be assigned to me. I'll gladly dig into this.&lt;BR /&gt;&lt;BR /&gt;If you are not already using our latest 11.1 release, there's perhaps a chance a newer compiler may offer a remedy too.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
The program is being ran on CentOS with&lt;BR /&gt;[thor@updraft ~]$ ifort -V&lt;BR /&gt;Intel Fortran Compiler Professional for applications running on IA-32, Version 11.1    Build 20090630 Package ID: l_cprof_p_11.1.046&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.&lt;BR /&gt;FOR NON-COMMERCIAL USE ONLY&lt;BR /&gt;&lt;BR /&gt;Because of the nature of this program I will have to send it to you in the Premier support. Though I am having problems logging into the premier support. Is the login provide for this forum what I should use to login with in the Premier section? As soon as I can get in I will send it to you along with some intructions.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 23:14:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758574#M14061</guid>
      <dc:creator>deadpickle</dc:creator>
      <dc:date>2009-09-01T23:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758575#M14062</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
The premier login ID is the same as the one for registrationcenter.intel.com. If you didn't register your software and thus create an account, you can do it at registrationcenter.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Sep 2009 00:01:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758575#M14062</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-09-02T00:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758576#M14063</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/411534"&gt;deadpickle&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;
The program is being ran on CentOS with&lt;BR /&gt;[thor@updraft ~]$ ifort -V&lt;BR /&gt;Intel Fortran Compiler Professional for applications running on IA-32, Version 11.1 Build 20090630 Package ID: l_cprof_p_11.1.046&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;FOR NON-COMMERCIAL USE ONLY&lt;BR /&gt;&lt;BR /&gt;Because of the nature of this program I will have to send it to you in the Premier support. Though I am having problems logging into the premier support. Is the login provide for this forum what I should use to login with in the Premier section? As soon as I can get in I will send it to you along with some intructions.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi,&lt;BR /&gt;What compiler options are you using?&lt;BR /&gt;&lt;BR /&gt;Here is how I would tackle such a problem:&lt;BR /&gt;&lt;BR /&gt;If it fails with -O0 (you get this by default with -g) then trust your print statements.&lt;BR /&gt;Once you have narrowed the problem down toa specific loop, put more print statements within the loop.&lt;BR /&gt;&lt;BR /&gt;Yes, that will create a huge amount of output, but don't worry, just redirect the output to a file and then&lt;BR /&gt;look at it with an editor.&lt;BR /&gt;&lt;BR /&gt;I have sometimes had success using valgrind in these sorts of problems.&lt;BR /&gt;&lt;BR /&gt;One suggestion is to compile with -g and run the program under idb (or idbc if you prefer the command line version). It should fall over and then give you the opportunity to look at the loop index and array variables around the problem area.&lt;BR /&gt;&lt;BR /&gt;I read that you had tried check bounds, but did you do a check all ?&lt;BR /&gt;These problems can also be caused by inconsistent passing of array parameters.&lt;BR /&gt;&lt;BR /&gt;happy hunting&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 02 Sep 2009 06:03:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758576#M14063</guid>
      <dc:creator>Mike_Rezny</dc:creator>
      <dc:date>2009-09-02T06:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: odd Seg fault location in Large program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758577#M14064</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/411534"&gt;deadpickle&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;Because of the nature of this program I will have to send it to you in the Premier support. Though I am having problems logging into the premier support. Is the login provide for this forum what I should use to login with in the Premier section? As soon as I can get in I will send it to you along with some intructions.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Send me an email (kevin.d.davis@intel.com) and I will forward alternative instructions to provide the code w/o using Premier.</description>
      <pubDate>Wed, 02 Sep 2009 12:07:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/odd-Seg-fault-location-in-Large-program/m-p/758577#M14064</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-09-02T12:07:09Z</dc:date>
    </item>
  </channel>
</rss>

