Improve compatibility with Fortran 2003.

This commit is contained in:
Grzegorz Kowal 2011-05-13 15:25:09 -03:00
parent bbeb181473
commit 3dcd8ad2b9
4 changed files with 26 additions and 20 deletions

View File

@ -182,6 +182,12 @@ module config
logical :: info
character(len=255) :: line, name, value
integer :: l
! external functions
!
integer :: iargc
intrinsic :: iargc, getarg
!
!-------------------------------------------------------------------------------
!

View File

@ -237,7 +237,8 @@ program amun
write(*,'(4x,a4,5x,a4,11x,a2,12x,a6,7x,a3)') 'step', 'time', 'dt' &
, 'blocks', 'ETA'
write(*,'(i8,2(1x,1pe14.6),2x,i8,2x,1i4.1,"d",1i2.2,"h",1i2.2,"m"' // &
',1i2.2,"s",a1,$)') n, t, dt, get_nleafs(), ed, eh, em, es, char(13)
',1i2.2,"s\r")',advance="no") &
n, t, dt, get_nleafs(), ed, eh, em, es
end if
! set the previous time needed to estimate the execution time
@ -297,9 +298,8 @@ program amun
!
if (is_master()) &
write(*,'(i8,2(1x,1pe14.6),2x,i8,2x,1i4.1,"d",1i2.2,"h",1i2.2,"m"' // &
',1i2.2,"s",a1,$)') n, t, dt, get_nleafs(), ed, eh, em, es &
, char(13)
',1i2.2,"s\r")',advance="no") &
n, t, dt, get_nleafs(), ed, eh, em, es
#if defined SIGNALS && defined MPI
! reduce termination flag over all processors
!

View File

@ -104,18 +104,18 @@ module mesh
! write the mesh statistics file header
!
write(funit,"('#')")
write(funit,"('#',4x,'step',5x,'time',11x,'leaf',4x,'meta'" // &
write(funit,"('#',4x,'step',5x,'time',11x,'leaf',4x,'meta'," // &
"6x,'coverage',8x,'AMR',11x,'block distribution')")
write(funit,"('#',27x,'blocks',2x,'blocks',4x,'efficiency'" // &
",6x,'efficiency',$)")
write(funit,"(1x,a12,$)") 'level = 1'
write(funit,"('#',27x,'blocks',2x,'blocks',4x,'efficiency'," // &
"6x,'efficiency')",advance='no')
write(funit,"(1x,a12)",advance="no") 'level = 1'
do l = 2, maxlev
write(funit,"(2x,i6,$)") l
write(funit,"(2x,i6)",advance="no") l
end do
#ifdef MPI
write(funit,"(1x,a10,$)") 'cpu = 1'
write(funit,"(1x,a10)",advance="no") 'cpu = 1'
do n = 2, ncpus
write(funit,"(2x,i6,$)") n
write(funit,"(2x,i6)",advance="no") n
end do
#endif /* MPI */
write(funit,"('' )")
@ -195,7 +195,7 @@ module mesh
if (is_master()) then
write(*,*)
write(*,"(1x,a)" ) "Generating the initial mesh:"
write(*,"(4x,a,$)") "generating level = "
write(*,"(4x,a)",advance="no") "generating level = "
end if
l = 1
@ -204,7 +204,7 @@ module mesh
! print the level currently processed
!
if (is_master()) &
write(*,"(1x,i2,$)") l
write(*,"(1x,i2)",advance="no") l
! iterate over all data blocks at the current level and initialize the problem
!
@ -1450,16 +1450,16 @@ module mesh
! write down the statistics
!
write(funit,"(2x,i8,2x,1pe14.8,2(2x,i6),2(2x,1pe14.8),$)") &
write(funit,"(2x,i8,2x,1pe14.8,2(2x,i6),2(2x,1pe14.8))",advance="no") &
n, t, nl, nm, cov, eff
write(funit,"(' ',$)")
write(funit,"(' ')",advance="no")
do l = 1, maxlev
write(funit,"(2x,i6,$)") ldist(l)
write(funit,"(2x,i6)",advance="no") ldist(l)
end do
#ifdef MPI
write(funit,"(' ',$)")
write(funit,"(' ')",advance="no")
do l = 1, ncpus
write(funit,"(2x,i6,$)") cdist(l)
write(funit,"(2x,i6)",advance="no") cdist(l)
end do
#endif /* MPI */
write(funit,"('')")

View File

@ -1562,7 +1562,7 @@ module problem
! return variable
!
integer(kind=1) :: check_ref
integer(kind=4) :: check_ref
! local variables
!