I made hoge as simple as possible and errors still coming.
Please tell me what problems are.
This is my Fortran subroutine code.
subroutine hoge(d)
complex(kind(0d0)), intent(out):: d(5,10,15) ! 5 10 15 does not have special meanings..
! these two lines works..
! integer, parameter :: dp = kind(0d0)
! complex(dp), intent(out) :: d(5,10,15)
do i=1,15
do j=1,10
do k=1,5
d(k,j,i)=0
enddo
enddo
enddo
! instead
! d(1:5,1:10,1:15)=0 or
! d(:,:,:)=0 also brings the error.
!
print*,'returning'
return
end subroutine hoge
I want to use a Fortran subroutine. I compiled like below
python -m numpy.f2py -c hoge.f90 -m hoge
and use as below
import hoge
hoge.hoge()
then the result is the three lines below:
Returning
double free or corruption (out)
Aborted (core dumped)
I totally have no idea... please tell me what problems are.
When the line has a change like below
do j=1,10 -> do j=1,5
the error does not occur... (for your information..)
1..6 brings the error.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…