- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You've let a lot unknown like the compiler used, your target architecture and OS.
I guessed, 11.1, Intel 64, Linux, and with the OpenMP directives in the code, try this:
$ ifort -V -mcmodel=medium -shared-intel -openmp code.f
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20091130 Package ID: l_cprof_p_11.1.064
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
Intel Fortran 11.1-2649
GNU ld version 2.17.50.0.6-5.el5 20061020
Its not clear how input.dat is intended to be read in, but to execute you may also need to increase your shell stack space using either:
For Bash/sh/ksh use: ulimit -s unlimited
For Csh use: limit stacksize unlimited
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sorry for that.
The os is centos - 5.2 ( linux x86_64).
intel compiler version is
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090318 Package ID: l_cprof_p_11.0.083Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
the input file is require to run the code
when i use
ifort -V -mcmodel=medium -shared-intel -openmp then it is compiling but when run it is giving
Segmentation fault.
i used ulimit -s unlimited
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I saw the the immediate segmentation fault too which is why I suggested commands to increase the shell stack limit, and after doing so on my system permits the application to execute and start writing MATRIX files. I didn't wait for the program to finish. Its not clear how long it supposedto run.
The immediate segmentation fault is almost certainly a shell stack limit issue. Assuming your working shell is bash/sh, if the ulimit command wasn't sufficient that suggests the defined maximum stack usage limit in your Linux kernel isn't sufficient to run the program with the current declared array sizes.
If you do not compile with -openmp, then you can try the other trick of compiling with -heap-arrays and you might find the program will run, but that's just a test as I expect you want to run with OpenMP enabled.
Given that, the other suggestion is to consider using allocatable arrays for some of the large static arrays; those declared (in many places) with dimension NN and MM are good candidates. Making some allocatable seems to allow the program to run using OpenMP and a shell stack limit of 10240 kbytes. As you know there are a number of large arrays declared with those parameters so you may need to make many if not all allocatable.
I recommend starting with getting the program to run with no optimizations (e.g. -O0) and using allocatable arrays, and then enable optimizations including OpenMP. You can also refer to this Knowledge Base article (here) for other tips on root causing the segmentation fault and other options to enable to help generate traceback, etc.
I hope that helps.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page