Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

eoshift in subroutine

alex00
Beginner
367 Views
Hi,

I met a problem when I use eoshift in subroutine.
Here's my code:

===========================================
Program tryeoshfit
implicit none

integer, parameter :: N = 200
real(kind=8), dimension(-N:N,-N:N) ::AA, BB, CC

AA = 5.0
print*,1
BB = eoshift(AA,1,dim=1) + eoshift(AA,-1,dim=1)
print*,2
call func_eoshift(N,AA,CC)
print*,5

ENd program

subroutine func_eoshift(N,AA,CC)
implicit none
integer, intent(in) :: N
real(kind=8),dimension(-N:N,-N:N),intent(in) :: AA
real(kind=8),dimension(-N:N,-N:N),intent(out) :: CC

print*, 3
CC = eoshift(AA,1,dim=1) + eoshift(AA,-1,dim=1)
print*, 4
end subroutine
==============================================

Then I complied this code with ifort and run,
==============
ifort tryeoshift.f90 -o tryeo -static-libcxa
./tryeo
==============

And I get the following message,
==============
1
2
3
Segmentation fault
===============

Any suggestions on this problem? I'm a new user to ifort and linux. I'm working on a Debian operation system. Do I need to provide any other infomation?

Thanks.

Best,
Alex
0 Kudos
1 Solution
Kevin_D_Intel
Employee
367 Views

Its not reproducible with the number of compilers that I tested. What version of ifort (add -V option) are you using?

Feels like this is a shell stack limit induced fault. Refer to Cause #2 in the Knowledge Base article (here)for information about increasing the shell stack limit.

View solution in original post

0 Kudos
2 Replies
Kevin_D_Intel
Employee
368 Views

Its not reproducible with the number of compilers that I tested. What version of ifort (add -V option) are you using?

Feels like this is a shell stack limit induced fault. Refer to Cause #2 in the Knowledge Base article (here)for information about increasing the shell stack limit.
0 Kudos
alex00
Beginner
367 Views

Its not reproducible with the number of compilers that I tested. What version of ifort (add -V option) are you using?

Feels like this is a shell stack limit induced fault. Refer to Cause #2 in the Knowledge Base article (here)for information about increasing the shell stack limit.

Yes. You're right. The problem is solved by command " unlimit stacksize ".

Great thanks.

Best,
Alex
0 Kudos
Reply