- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I'm aware of the thread on this forum about the segmentation fault. I have tried most of the things that were proposed but I still have some problems.
I have a piece of code in fortran that compiles and runs well under windows and Linux. However when I try to compile and run it under mac os x (snow leopard) it gives a segfault (intel fortran compiler 11.1).
In fact it seems that the trouble is coming from the multiple files optimisation (-ipo or -fast options).
If I try the following option:
FFLAGS= -m64 -heap-arrays -override-limits -O3 -fp-stack-check -check all
Everything compiling well and the run gives the good results (but of course it runs really slowly).
If I try to use
FFLAGS= -m64 -heap-arrays -fast
or even
FFLAGS= -heap-arrays -O3
It crashes with
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
sedsim8 000000010015A258 Unknown Unknown Unknown
sedsim8 0000000100177DAE Unknown Unknown Unknown
sedsim8 000000010009D54C Unknown Unknown Unknown
sedsim8 0000000100000CCC Unknown Unknown Unknown
sedsim8 0000000100000C64 Unknown Unknown Unknown
I try to increase the stack size under mac with:
ulimit -Ss unlimited
ulimit -c unlimited
But the problem remains.
I had a try with g95 (option:FFLAGS= -O2 -funroll-loops) and the program compiles and runs (around 5 times faster than the ifort not optimised).
Do you have any ideas to speed up the code and is there a problem with the mac installation of intel fortran compiler?
Cheers
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of Xcode do you have installed? Check the first post on this forum regarding the Xcode 3.2.2 problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot change the stacksize limit passed 64Mb on a Mac. I notified Apple about this but they basically shrugged. That being said, not sure that -heap-arrays will actually work on a Mac. The only way to test is to replace any colon driven implicit loops, which use stack storage, into explicit loops, i.e.,
a(1:20,1:50,1:25)= b(1:20,1:50,1:25)
with
do k=1,25
do j=1,50
do i=1,20
a(i,j,k)=b(i,j,k)
enddo
enddo
enddo
G95 may be doing this automatically with -funroll-loops.
John
a(1:20,1:50,1:25)= b(1:20,1:50,1:25)
with
do k=1,25
do j=1,50
do i=1,20
a(i,j,k)=b(i,j,k)
enddo
enddo
enddo
G95 may be doing this automatically with -funroll-loops.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-heap-arrays does work with the Mac OS compiler.
If none of these suggestions help, you can open an issue at premier.intel.com (if you have an active support license) OR post the files here so we can test it.
ron
If none of these suggestions help, you can open an issue at premier.intel.com (if you have an active support license) OR post the files here so we can test it.
ron

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