- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
I work on linux red-hat 7.3.I have both the compiler intel 7.0 and 8.0 (free version) installed.
I have written here a small program which shows segmentation fault whenever i try to compile it and the run it with intel 8.0 version, with a bigger array size.but if i compile it with intel 7.0 version it perfectly works.
could anyone point out what is the problem ?
***the pourpose of the test program is this it replaces the element of a matrix by the sum of its nearest neighbour i.e if i start with matrix whose all elements set to 1,i'll get a matrix whose all elements equal to 4; since
no of nearest neighbour is 4.
***************************************************************
program matrix
integer,parameter :: k=1624
real,target :: mat(k,k)
real,pointer :: pm(:,:)
integer,target :: x1(k),x_1(k),x(k)
integer,pointer :: p1(:),p_1(:),p(:)
integer :: i
mat=1.0
x=reshape( (/(i,i=1,k)/) ,(/k/))
p=>x
x1=cshift(x, shift=1)
x_1=cshift(x, shift=-1)
pm=>mat
p1=>x1
p_1=>x_1
pm=pm(p1,p)+pm(p_1,p)+pm(p,p1)+pm(p,p_1)
print*,mat
end program matrix
*****************************************************
I work on linux red-hat 7.3.I have both the compiler intel 7.0 and 8.0 (free version) installed.
I have written here a small program which shows segmentation fault whenever i try to compile it and the run it with intel 8.0 version, with a bigger array size.but if i compile it with intel 7.0 version it perfectly works.
could anyone point out what is the problem ?
***the pourpose of the test program is this it replaces the element of a matrix by the sum of its nearest neighbour i.e if i start with matrix whose all elements set to 1,i'll get a matrix whose all elements equal to 4; since
no of nearest neighbour is 4.
***************************************************************
program matrix
integer,parameter :: k=1624
real,target :: mat(k,k)
real,pointer :: pm(:,:)
integer,target :: x1(k),x_1(k),x(k)
integer,pointer :: p1(:),p_1(:),p(:)
integer :: i
mat=1.0
x=reshape( (/(i,i=1,k)/) ,(/k/))
p=>x
x1=cshift(x, shift=1)
x_1=cshift(x, shift=-1)
pm=>mat
p1=>x1
p_1=>x_1
pm=pm(p1,p)+pm(p_1,p)+pm(p,p1)+pm(p,p_1)
print*,mat
end program matrix
*****************************************************
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 8.0 compiler tends to use more stack than the 7.0 compiler did, especially for array expressions and temporaries. Try raising your stacksize limit and see if that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My laptop had no trouble with this, using ifort 8.0.044, aside from the overwhelming 40MB of screen output.
I've found the performance of CSHIFT() disappointing. Ifort has specific peeling optimizations which help only with the vectorized f77 form of that operation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
thank you for your kind information. but i don't have much knowledge in computer, and i dont understand what u mean to say by raising the stacksize limit.i also read 'intel Fortran Compiler 8.0 for Linux* Systems Release Notes'; they have sugested to' link libpthreads dynamically'.
please could you explain me in detail how to do it
thank you,
thank you for your kind information. but i don't have much knowledge in computer, and i dont understand what u mean to say by raising the stacksize limit.i also read 'intel Fortran Compiler 8.0 for Linux* Systems Release Notes'; they have sugested to' link libpthreads dynamically'.
please could you explain me in detail how to do it
thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
thank you for yuor suggestion. inceasing the stack size solve the problem; but if i want to optimize it with -fast option sementation fault again appears.
can u tell me what is wrong?
thank you for yuor suggestion. inceasing the stack size solve the problem; but if i want to optimize it with -fast option sementation fault again appears.
can u tell me what is wrong?

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