########## PREDICTION OF CALCULATION ###########
start date 2007-03-08t16:49:25+09:00
current date 2007-03-08t16:49:27+09:00
progress 66.67% [**************** ]
remaining cpu time 0.100000e+01
completion date 2007-03-08t16:49:28+09:00
1130 use dc_date,
only:
operator(+), dcdatetimecreate,
tochar, evalsec, &
1131 & dcdifftimecreate
1132 implicit none
1133 type(CLOCK), intent(in):: clk
1134 real, intent(in):: progress
1135 integer, intent(in), optional:: unit
1136 logical, intent(out), optional:: err
1137 character(STRING):: cause_c
1138 integer:: stat, out_unit
1139 type(DC_DIFFTIME):: remain_diff
1140 type(DC_DATETIME):: comp_date, cur_date
1141 character(7):: prog_percent
1142 character(25):: prog_bar
1143 integer:: prog_bar_ptr
1144 real:: prog_valid
1145 character(*), parameter:: subname = 'DCClockPredict'
1146 continue
1147 call beginsub(subname)
1149 cause_c = 'CLOCK'
1150 if (.not. clk % initialized) then
1151 call messagenotify(
'W', subname,
'Call Create before Predict in dc_clock.')
1152 call dbgmessage('Ignored because input argument was not initialized.')
1154 goto 999
1155 end if
1156 if (progress <= 0.0) then
1157 call messagenotify(
'W', subname,
'Specify 0.0 -- 1.0 value to "progress"')
1158 return
1159 elseif (progress > 1.0) then
1160 call messagenotify(
'W', subname,
'Over 1.0 value to "progress" was modified to 1.0')
1161 prog_valid = 1.0
1162 else
1163 prog_valid = progress
1164 end if
1165 if (present(unit)) then
1166 out_unit = unit
1167 else
1169 end if
1170 call dcdifftimecreate( remain_diff, &
1171 & sec = real(nint(evalsec(clk) / prog_valid * (1.0 - prog_valid)),
dp) )
1172 call dcdatetimecreate(cur_date)
1173 comp_date = cur_date + remain_diff
1174 prog_percent = ''
1175 prog_percent = adjustr(trim(printf_g5_2(real(prog_valid * 100,
dp))) //
'%')
1176 prog_bar = ''
1177 prog_bar_ptr = int(prog_valid * 25)
1178 if (prog_bar_ptr > 0) prog_bar(1:prog_bar_ptr) = '*************************'
1179 call printf(out_unit,
'')
1181 & ' ########## PREDICTION OF CALCULATION ###########')
1183 &
' Start Date %c', c1=trim(
tochar(clk % start_date)))
1185 &
' Current Date %c', c1=trim(
tochar(cur_date)))
1187 & ' Progress %c [%c]', c1=prog_percent, c2=prog_bar)
1189 & ' Remaining CPU TIME %c %c', &
1190 & c1=trim(result_value_form(evalsec(remain_diff))), &
1191 & c2=trim(fit_unit_value(0.0_dp, remain_diff)))
1193 &
' Completion Date %c', c1=trim(
tochar(comp_date)))
1194999 continue
1196 call endsub(subname)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
integer, parameter, public dc_noerr
エラー等を保持
integer, parameter, public stdout
標準出力の装置番号
integer, parameter, public dp
倍精度実数型変数