<?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: Segmentation Fault on Fortran in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761975#M17462</link>
    <description>This command does not go in your makefile.  It something you use to affect the environment in which you run the program.&lt;BR /&gt;&lt;BR /&gt;Is the line identified the beginning of the subroutine itself and not an executable line?  If so, that suggests that the routine declares large "automatic arrays" - local arrays whose bounds depend on an argument.  These can be replaced by allocatable arrays easy enough.  So if you have:&lt;BR /&gt;&lt;BR /&gt;subroutine sub (n)&lt;BR /&gt;real bigarray(n)&lt;BR /&gt;&lt;BR /&gt;replace this with:&lt;BR /&gt;&lt;BR /&gt;subroutine sub (n)&lt;BR /&gt;real, allocatable :: bigarray(:)&lt;BR /&gt;&lt;BR /&gt;and then add as the first line of executable code:&lt;BR /&gt;&lt;BR /&gt;allocate (bigarray(n))&lt;BR /&gt;&lt;BR /&gt;the rest of the routine can remain unchanged.</description>
    <pubDate>Wed, 20 Jul 2005 01:01:06 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2005-07-20T01:01:06Z</dc:date>
    <item>
      <title>Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761972#M17459</link>
      <description>I am developing a new program that involves an array of size 450^3 elements of Real(8) values, but I may have to go even higher to say 600^3 depending on how many points I need in my grid. &lt;BR /&gt;&lt;BR /&gt;I am unable to get the program to run, getting the below error - &lt;BR /&gt;&lt;BR /&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred&lt;BR /&gt;Image              PC        Routine            Line        Source             &lt;BR /&gt;DCV_GCMD_TwinZeol  081069FE  Unknown               Unknown  Unknown&lt;BR /&gt;DCV_GCMD_TwinZeol  0810292C  Unknown               Unknown  Unknown&lt;BR /&gt;DCV_GCMD_TwinZeol  080E9FB1  Unknown               Unknown  Unknown&lt;BR /&gt;DCV_GCMD_TwinZeol  080E998B  Unknown               Unknown  Unknown&lt;BR /&gt;DCV_GCMD_TwinZeol  08053C35  initializezeolpot          65  Initialize.f90&lt;BR /&gt;DCV_GCMD_TwinZeol  0804BED2  MAIN__.H                   34  DCV_GCMC.f90&lt;BR /&gt;DCV_GCMD_TwinZeol  0804A3B8  Unknown               Unknown  Unknown&lt;BR /&gt;libc.so.6          75FE2E33  Unknown               Unknown  Unknown&lt;BR /&gt;DCV_GCMD_TwinZeol  0804A271  Unknown               Unknown  Unknown&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is a classic segmentation fault problem, where I am using a super large array. I am running my code in a beowulf cluster, where I request 1500 mb. I am questioning if this is purely a memory problem, but a stack problem. &lt;BR /&gt;&lt;BR /&gt;A google search nor did a search through "man ifort" (fortran manual) show me how to modify the stack size for my program. I assume that if I can enlarge my stack or switch my program over to the "heap" I can get the code to run. Does anyone know how to modify Fortran for Linux to modify the stack size? Or any other pointers/experience here?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance, David</description>
      <pubDate>Tue, 19 Jul 2005 11:39:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761972#M17459</guid>
      <dc:creator>dnewsome</dc:creator>
      <dc:date>2005-07-19T11:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761973#M17460</link>
      <description>The Linux command to change the stacklimit depends on your shell.  It can be:&lt;BR /&gt;&lt;BR /&gt;ulimit -s&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;limit stacksize unlimited&lt;BR /&gt;&lt;BR /&gt;Unfortunately, "unlimited" doesn't really mean that and sometimes setting an explicit but large value works better.&lt;BR /&gt;&lt;BR /&gt;What is the statement at line 65 of initializezeolpot?</description>
      <pubDate>Tue, 19 Jul 2005 20:23:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761973#M17460</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-07-19T20:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761974#M17461</link>
      <description>The initializezeolpot means "initialize zeolite potential" - it is a simple subroutine to read in energy parameters from a linux script (my works involves physical chemistry) so that I can change my variables without having to hardwire the values in my code.  It has worked before in previous editions, but is where the actual segmentation fault occurs. I suspect the stack deficiency for the large arrays interferes with this subroutine working. Also, this subroutine is the first task done in my program. &lt;BR /&gt;&lt;BR /&gt;I did find the command ulimit -s in my search, but not in the fortran manual. Would I place this command in the fortran flags in my makefile when I recompile my code? &lt;BR /&gt;&lt;BR /&gt;How could I specify an explicit stack size, and how would I know how much memory to specify? &lt;BR /&gt;&lt;BR /&gt;Thanks, David</description>
      <pubDate>Wed, 20 Jul 2005 00:28:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761974#M17461</guid>
      <dc:creator>dnewsome</dc:creator>
      <dc:date>2005-07-20T00:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761975#M17462</link>
      <description>This command does not go in your makefile.  It something you use to affect the environment in which you run the program.&lt;BR /&gt;&lt;BR /&gt;Is the line identified the beginning of the subroutine itself and not an executable line?  If so, that suggests that the routine declares large "automatic arrays" - local arrays whose bounds depend on an argument.  These can be replaced by allocatable arrays easy enough.  So if you have:&lt;BR /&gt;&lt;BR /&gt;subroutine sub (n)&lt;BR /&gt;real bigarray(n)&lt;BR /&gt;&lt;BR /&gt;replace this with:&lt;BR /&gt;&lt;BR /&gt;subroutine sub (n)&lt;BR /&gt;real, allocatable :: bigarray(:)&lt;BR /&gt;&lt;BR /&gt;and then add as the first line of executable code:&lt;BR /&gt;&lt;BR /&gt;allocate (bigarray(n))&lt;BR /&gt;&lt;BR /&gt;the rest of the routine can remain unchanged.</description>
      <pubDate>Wed, 20 Jul 2005 01:01:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761975#M17462</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-07-20T01:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761976#M17463</link>
      <description>I tested my code by starting with a small array size, and for any array smaller than 250^3 Real(8) elements, I get the code to run. For anything 300^3 or larger I get the segmentation fault. (The exact critical size N^3 is not exactly known, but with 250300).&lt;BR /&gt;&lt;BR /&gt;My network admin told me that he set the stack and other relevant terms to be unlimited.&lt;BR /&gt;&lt;BR /&gt;(**paste**)&lt;BR /&gt;&lt;BR /&gt;beowulf (~)% limit&lt;BR /&gt;cputime unlimited&lt;BR /&gt;filesize unlimited&lt;BR /&gt;datasize unlimited&lt;BR /&gt;stacksize unlimited&lt;BR /&gt;coredumpsize unlimited&lt;BR /&gt;memoryuse unlimited&lt;BR /&gt;vmemoryuse unlimited&lt;BR /&gt;&lt;BR /&gt;(**/paste**)&lt;BR /&gt;&lt;BR /&gt;He also indicates he knows that fortran has a limit on what a given variable memory size can be.&lt;BR /&gt;&lt;BR /&gt;Are you aware of the exact limitations on intel fortran. Would using the Allocate attribute solve this error.&lt;BR /&gt;&lt;BR /&gt;For my problem, the 8 arrays I am using are not declared locally in any subroutine, but are in a module and used in various points in my code. How can I dynamically allocate memory for them in this case. In your example, it was for a local array in the subroutine.&lt;BR /&gt;&lt;BR /&gt;Thanks again, David</description>
      <pubDate>Fri, 22 Jul 2005 02:32:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761976#M17463</guid>
      <dc:creator>dnewsome</dc:creator>
      <dc:date>2005-07-22T02:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault on Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761977#M17464</link>
      <description>A followup to my last message since it got botched somehow in the top when I refer to "250300".&lt;BR /&gt;&lt;BR /&gt;N is between 250 and 300 is what I meant.</description>
      <pubDate>Fri, 22 Jul 2005 02:34:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Segmentation-Fault-on-Fortran/m-p/761977#M17464</guid>
      <dc:creator>dnewsome</dc:creator>
      <dc:date>2005-07-22T02:34:12Z</dc:date>
    </item>
  </channel>
</rss>

