Skip to content

Commit acd3616

Browse files
fix: bk_emit_result内部で科学表記を小数に正規化、run.sh側の個別丸め処理を削除
[code:ffb] [system:FugakuCN]
1 parent 517b93b commit acd3616

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

programs/genesis-nonbonded-kernels/run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ case "$system" in
8080
#printf "result%d: %.3f\n" "$index" "$fom_val" >> ${resultsdir}/result
8181
#total_fom=$(awk -v a="$total_fom" -v b="$fom_val" 'BEGIN{printf("%.6f", a + b)}')
8282

83-
fom_val=$(printf "%.3f" "$fom_val")
8483
bk_emit_result --fom "$fom_val" --exp "$name" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ${resultsdir}/result
8584
done
8685

programs/genesis/run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ if [[ -z "$fom_val" ]]; then
147147
fom_val="nan" # or 0.0
148148
fi
149149

150-
fom_val=$(printf "%.3f" "$fom_val")
151150
bk_emit_result --fom "$fom_val" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ${resultsdir}/result
152151
# if information is requierd
153152
#printf "%-10s nodes=%2d numproc=%3d FOM: %.3f\n" \

scripts/bk_functions.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ bk_emit_result() {
125125
;;
126126
esac
127127

128+
# Normalize scientific notation (e.g. 3.64E+01 -> 36.400) to plain decimal
129+
case "$_bk_fom" in
130+
*[eE]*)
131+
_bk_fom=$(awk "BEGIN {printf \"%.6g\", $_bk_fom}")
132+
;;
133+
esac
134+
128135
# Build output line
129136
_bk_output="FOM:${_bk_fom}"
130137

0 commit comments

Comments
 (0)