I get the following warning at runtime:
... forrtl: warning (402): fort: (1): In call to I/O Write routine, an array temporary was created for argument
for each subprogram / record statement call.
Subroutine call:
integer :: l,kreise character(*)::setname real(8),diemnsion(:,:,:),allocatable::stripe integer,dimension(:)s(j) ...code and allocation of arrays... do j=n(1) call geradheit_linial (s(j),stripe(j,1:s(j),1), & stripe(j,1:s(j),2),setname) end do ... subroutine geradheit_linial (ndaten,x,r,setname) implicit none integer,intent(in) :: ndaten real(8),dimension(ndaten),intent(in) :: x,r character(*),intent(in) :: setname
and write operator:
write(91,*)'Gerade: ',gerade(maxloc(reslt(1:i)),minsumloc,1), & gerade(maxloc(reslt(1:i)),minsumloc,2)
The stripe array is allocated with the maximum value expected for each dimension, so most of the time only a subset is passed through the call.
As far as I understand, this is not a problem in terms of accuracy, but it can slow down the program, so most of the writing to RAM is performed. So, how much does this slow down my calculations ( stripe can have a size around stripe(100,300,3) and may become bigger sometime later)? And how can I avoid such extra arrays ?.