- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Compiling this program with ifort version 15.0.1 gives me:
testarray.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for testarray.f90 (code 1)
Here is the code:
module test
implicit none
contains
function sum_assumedshape(input, length) result(output)
complex, dimension(:), intent(in) :: input
complex :: output
integer, intent(in) :: length
integer :: i
output = cmplx(0.0, 0.0)
do i = 1, length
output = output + input(i)
end do
end function
function sum_assumedsize(input, length) result(output)
complex, dimension(length), intent(inout) :: input
complex :: output
integer, intent(in) :: length
integer :: i
output = cmplx(0.0, 0.0)
do i = 1, length
output = output + input(i)
end do
end function
end module
program sizevsshape
use test
implicit none
complex, allocatable, dimension(:) :: in[:]
complex :: out
integer :: i
integer, parameter :: length = 4
allocate(in(length)
in = (/(cmplx(real(i),0.0), i=1, length)/)
if(this_image() == 1) write(*,*) in
out = sum_assumedshape(in, length)
if(this_image() == 1) write(*,*) out
out = sum_assumedsize(in, length)
if(this_image() == 1) write(*,*) out
end program
When I compile this with ifort 14. it works but the assumed size function
gives me a wrong result.
Thank you
Jan
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The internal compiler error is gone in 15.0.3, but the wrong results remain. However, the 16.0 beta works fine,so it looks as if this has already been fixed.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Oh ok!
Thank you!
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite