大文字のファイルには、processes
とbenchmark
の大文字の情報が含まれています。このすべての情報は、同じファイル内で順番に続きます。すぐに「Allgather_8」と「Allgather_16」と呼ばれる2つのファイルを作成することになり、私の上に与えられた情報と予想されるコンテンツで、私は、例えば、独立したコンテンツごとにファイルを作成することを計画していた情報をプロットするために1つのファイルの抽出されたコンテンツからファイルを作成する
--
# Benchmarking Allgather
# #processes = 8
# (3592 additional processes waiting in MPI_Barrier)
#----------------------------------------------------------------
#bytes #repetitions t_min[usec] t_max[usec] t_avg[usec]
0 1000 0.05 0.05 0.05
1 1000 1.77 2.07 1.97
2 1000 1.79 2.08 1.97
4 1000 1.79 2.07 1.98
8 1000 1.82 2.12 2.01
--
# Benchmarking Allgather
# #processes = 16
# (3584 additional processes waiting in MPI_Barrier)
#----------------------------------------------------------------
#bytes #repetitions t_min[usec] t_max[usec] t_avg[usec]
0 1000 0.05 0.05 0.05
1 1000 2.34 2.85 2.73
2 1000 2.36 2.87 2.74
4 1000 2.38 2.90 2.76
8 1000 2.42 2.95 2.79
これらのファイルのようになります:私は、その後gnuplotのまたはmatplotlibのでこれをプロットすることができ
$cat Allgather_8
#bytes #repetitions t_min[usec] t_max[usec] t_avg[usec]
0 1000 0.05 0.05 0.05
1 1000 1.77 2.07 1.97
2 1000 1.79 2.08 1.97
4 1000 1.79 2.07 1.98
8 1000 1.82 2.12 2.01
$cat Allgather_16
#bytes #repetitions t_min[usec] t_max[usec] t_avg[usec]
0 1000 0.05 0.05 0.05
1 1000 2.34 2.85 2.73
2 1000 2.36 2.87 2.74
4 1000 2.38 2.90 2.76
8 1000 2.42 2.95 2.79
。
私は独立したセクションのために動作しますが、私はこれを自動化する方法がわからないコンテンツを抽出するためにはgrepやawkのを使用している:私はこれまで試してみました何
。
アイデア?
「 - 」を区切るデリミタは何ですか?上記のように? – Inian