- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All!
It looks like I have fixed an internal compiler error using Intel Fortran compiler 8.0 and 8.1 which is connected with the passing arguments in the subroutines. And thus it is very interesting to get know if someone else has had such troubles before me.
The following code makes the Intel Fortran compiler 8.0 crashed:
module MTest
implicit none
type TTest
integer(4), pointer :: a(:) => null()
integer(4) :: field
real(8) :: r8
end type TTest
contains
subroutine s2(k)
implicit none
type(TTest), intent(in) :: k(:)
call s1( k(1:10).field )
end subroutine s2
subroutine s1(i)
implicit none
integer(4), intent(in) :: i(:)
write(*,*) i
end subroutine s1
end module MTest
program Ptest
use MTest
integer(4), parameter :: n = 50000
type(TTest), pointer :: t(:) => null()
allocate( t(n) )
do i = 1, size(t)
allocate(t(i).a(10)); t(i).a = i; t(i).field = i
enddo
call s2( t )
end program Ptest
It is to note that (for exmple) Compaq Fortran compiler under Windows systems works fine in this case.
After that I tried to find out if this could be a problem with data transfer and wrong addressing.
The funny thing is that if I comment pointer array in the type declaration
...
type TTest
!!! integer(4), pointer :: a(:) => null()
integer(4) :: field
real(8) :: r8
end type TTest
...
then no errors are produced and the code works correctly.
So, it is very interesting and useful for me to find out how to avoid this problem, but without using assume size arrays for it is very difficult and time-consuming to rewrite my code (over 1 Mb of sources).
Also, I would like to note that 8.1 compiler has such problem too, but tells nothing when compiling.
Finally, I would be VERY thankful to everyone who provide me with information of how to fight with this problem and, if there is no way to avoid this, does Intel Fortran compiler 9.0 have such BUG?
It looks like I have fixed an internal compiler error using Intel Fortran compiler 8.0 and 8.1 which is connected with the passing arguments in the subroutines. And thus it is very interesting to get know if someone else has had such troubles before me.
The following code makes the Intel Fortran compiler 8.0 crashed:
module MTest
implicit none
type TTest
integer(4), pointer :: a(:) => null()
integer(4) :: field
real(8) :: r8
end type TTest
contains
subroutine s2(k)
implicit none
type(TTest), intent(in) :: k(:)
call s1( k(1:10).field )
end subroutine s2
subroutine s1(i)
implicit none
integer(4), intent(in) :: i(:)
write(*,*) i
end subroutine s1
end module MTest
program Ptest
use MTest
integer(4), parameter :: n = 50000
type(TTest), pointer :: t(:) => null()
allocate( t(n) )
do i = 1, size(t)
allocate(t(i).a(10)); t(i).a = i; t(i).field = i
enddo
call s2( t )
end program Ptest
It is to note that (for exmple) Compaq Fortran compiler under Windows systems works fine in this case.
After that I tried to find out if this could be a problem with data transfer and wrong addressing.
The funny thing is that if I comment pointer array in the type declaration
...
type TTest
!!! integer(4), pointer :: a(:) => null()
integer(4) :: field
real(8) :: r8
end type TTest
...
then no errors are produced and the code works correctly.
So, it is very interesting and useful for me to find out how to avoid this problem, but without using assume size arrays for it is very difficult and time-consuming to rewrite my code (over 1 Mb of sources).
Also, I would like to note that 8.1 compiler has such problem too, but tells nothing when compiling.
Finally, I would be VERY thankful to everyone who provide me with information of how to fight with this problem and, if there is no way to avoid this, does Intel Fortran compiler 9.0 have such BUG?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This compiles fine in 9.0.
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