2014-04-11 01:53:15 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, output_wall_time_0 ]
|
|
|
|
&BEGIN_PROVIDER [ double precision, output_cpu_time_0 ]
|
2014-04-03 01:50:22 +02:00
|
|
|
implicit none
|
2014-04-11 01:53:15 +02:00
|
|
|
BEGIN_DOC
|
|
|
|
! Initial CPU and wall times when printing in the output files
|
2014-04-03 01:50:22 +02:00
|
|
|
END_DOC
|
2014-04-11 01:53:15 +02:00
|
|
|
call cpu_time(output_wall_time_0)
|
|
|
|
call wall_time(output_wall_time_0)
|
2014-04-03 01:50:22 +02:00
|
|
|
END_PROVIDER
|
2014-04-11 01:53:15 +02:00
|
|
|
|
|
|
|
BEGIN_SHELL [ /bin/bash ]
|
|
|
|
|
2014-05-24 02:39:18 +02:00
|
|
|
for NAME in $(\ls -d ${QPACKAGE_ROOT}/src/*/)
|
2014-04-11 01:53:15 +02:00
|
|
|
do
|
2014-05-24 02:39:18 +02:00
|
|
|
NAME=$(basename ${NAME})
|
2014-04-11 01:53:15 +02:00
|
|
|
cat << EOF
|
|
|
|
BEGIN_PROVIDER [ integer, output_$NAME ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Output file for $NAME
|
|
|
|
END_DOC
|
|
|
|
PROVIDE output_wall_time_0 output_cpu_time_0
|
|
|
|
integer :: getUnitAndOpen
|
|
|
|
call ezfio_set_output_empty(.False.)
|
|
|
|
output_$NAME = getUnitAndOpen(trim(ezfio_filename)//'/output/'//'$NAME.rst','a')
|
|
|
|
write(output_$NAME,'(A)') &
|
|
|
|
'--------------------------------------------------------------------------------'
|
|
|
|
END_PROVIDER
|
|
|
|
EOF
|
|
|
|
done
|
|
|
|
|
|
|
|
END_SHELL
|
|
|
|
|
|
|
|
subroutine write_time(iunit)
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Write a time stamp in the output for chronological reconstruction
|
|
|
|
END_DOC
|
|
|
|
integer, intent(in) :: iunit
|
|
|
|
double precision :: wt, ct
|
|
|
|
call cpu_time(ct)
|
|
|
|
call wall_time(wt)
|
|
|
|
write(iunit,*)
|
|
|
|
write(iunit,'(A,F15.6,A,F15.6,A)') &
|
|
|
|
'.. >>>>> [ WALL TIME: ', wt-output_wall_time_0, &
|
|
|
|
' s ] [ CPU TIME: ', ct-output_cpu_time_0, ' s ] <<<<< ..'
|
|
|
|
write(iunit,*)
|
|
|
|
end
|
|
|
|
|
|
|
|
subroutine write_double(iunit,value,label)
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Write a double precision value in output
|
|
|
|
END_DOC
|
|
|
|
integer, intent(in) :: iunit
|
|
|
|
double precision :: value
|
|
|
|
character*(*) :: label
|
2014-06-25 14:58:58 +02:00
|
|
|
character*(64), parameter :: f = '(A50,G24.16)'
|
2014-04-11 01:53:15 +02:00
|
|
|
character*(50) :: newlabel
|
|
|
|
write(newlabel,'(A,A)') '* ',trim(label)
|
|
|
|
write(iunit,f) newlabel, value
|
|
|
|
end
|
2014-04-03 01:50:22 +02:00
|
|
|
|
|
|
|
|
2014-04-11 01:53:15 +02:00
|
|
|
subroutine write_int(iunit,value,label)
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Write an integer value in output
|
|
|
|
END_DOC
|
|
|
|
integer, intent(in) :: iunit
|
|
|
|
integer :: value
|
|
|
|
character*(*) :: label
|
|
|
|
character*(64), parameter :: f = '(A50,I16)'
|
|
|
|
character*(50) :: newlabel
|
|
|
|
write(newlabel,'(A,A)') '* ',trim(label)
|
|
|
|
write(iunit,f) newlabel, value
|
|
|
|
end
|
2014-04-03 01:50:22 +02:00
|
|
|
|
|
|
|
|