server_scripts 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/server_scripts/parser/vtune/hotspots.rb +1 -0
- data/lib/server_scripts/parser/vtune/hotspots/base.rb +11 -0
- data/lib/server_scripts/parser/vtune/hotspots/threads.rb +0 -8
- data/lib/server_scripts/parser/vtune/hotspots/threads/slate.rb +35 -0
- data/lib/server_scripts/parser/vtune/hotspots/threads/starpu.rb +1 -1
- data/lib/server_scripts/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a56c1d87d7ec945dd7ff3ee8c29ff44b3012fed
|
4
|
+
data.tar.gz: f638a56fac759785ae663fcd6ca188b71c28948b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb5b8f703ffe938248d2c3b5dda4a379df984770fbf5523bbefaf06675feb8502b4fea5c694d2cb18ea89d07b797e5bd2e48e1d6ae3f3270b83bd529b9258dbe
|
7
|
+
data.tar.gz: 79ca166d74f4aadc444d12aa6f4fe15a070ac263e1573131b386b60440a522554ead76d9bf730e284dbc7fd2e658496b42d7fa76087b1a3491df1cc1cb576ab3
|
data/README.md
CHANGED
@@ -64,6 +64,20 @@ job submission command.
|
|
64
64
|
If you want to generate traces using intel MPI, you can use additional options
|
65
65
|
like setting the ITAC and VTUNE output file/folder names.
|
66
66
|
|
67
|
+
## Parse intel VTune output
|
68
|
+
|
69
|
+
``` ruby
|
70
|
+
parser = Parser::VTune::Hotspots::SLATE.new(
|
71
|
+
"test/artifacts/slate-two-proc-p1.csv", nthreads: 16)
|
72
|
+
|
73
|
+
puts parser.total_cpu_time
|
74
|
+
puts parser.total_cpu_effective_time
|
75
|
+
puts parser.total_cpu_overhead_time
|
76
|
+
puts parser.total_wait_time
|
77
|
+
puts parser.total_mpi_busy_time
|
78
|
+
puts parser.total_time
|
79
|
+
```
|
80
|
+
|
67
81
|
## Parse intel ITAC output
|
68
82
|
|
69
83
|
The intel ITAC tool can be helpful for generating traces of parallel MPI programs.
|
@@ -7,12 +7,23 @@ module ServerScripts
|
|
7
7
|
CPU_EFFECTIVE_TIME = "CPU Time:Effective Time"
|
8
8
|
CPU_OVERHEAD_TIME = "CPU Time:Overhead Time"
|
9
9
|
CPU_SPIN_TIME = "CPU Time:Spin Time"
|
10
|
+
MPI_BUSY_TIME = "CPU Time:Spin Time:MPI Busy Wait Time"
|
10
11
|
WAIT_TIME = "Wait Time"
|
11
12
|
|
12
13
|
def initialize fname
|
13
14
|
@threads = {}
|
14
15
|
parse_csv! fname
|
15
16
|
end
|
17
|
+
|
18
|
+
protected
|
19
|
+
|
20
|
+
def parse_for_event event
|
21
|
+
total = 0.0
|
22
|
+
@threads.each_value do |thread|
|
23
|
+
total += thread[event]
|
24
|
+
end
|
25
|
+
total
|
26
|
+
end
|
16
27
|
end
|
17
28
|
end # class Base
|
18
29
|
end # module VTune
|
@@ -46,14 +46,6 @@ module ServerScripts
|
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
|
-
def parse_for_event event
|
50
|
-
total = 0.0
|
51
|
-
@threads.each_value do |thread|
|
52
|
-
total += thread[event]
|
53
|
-
end
|
54
|
-
total
|
55
|
-
end
|
56
|
-
|
57
49
|
def parse_csv! fname
|
58
50
|
data = CSV.parse(File.read(fname), headers: true)
|
59
51
|
data.each_with_index do |row, i|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module ServerScripts
|
2
|
+
module Parser
|
3
|
+
module VTune
|
4
|
+
module Hotspots
|
5
|
+
class SLATE < Threads
|
6
|
+
def initialize fname, nthreads:
|
7
|
+
@num_threads = nthreads
|
8
|
+
super(fname)
|
9
|
+
end
|
10
|
+
|
11
|
+
def total_mpi_busy_time
|
12
|
+
@total_mpi_busy_time ||= parse_for_event(:mpi_busy_time)
|
13
|
+
@total_mpi_busy_time
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def parse_csv! fname
|
19
|
+
data = CSV.parse(File.read(fname), headers: true)
|
20
|
+
data.each_with_index do |row, i|
|
21
|
+
break if i == (@num_threads-1)
|
22
|
+
@threads[i] = {}
|
23
|
+
@threads[i][:cpu_time] = data[CPU_TIME][i].to_f
|
24
|
+
@threads[i][:cpu_effective_time] = data[CPU_EFFECTIVE_TIME][i].to_f
|
25
|
+
@threads[i][:cpu_overhead_time] = data[CPU_OVERHEAD_TIME][i].to_f +
|
26
|
+
data[CPU_SPIN_TIME][i].to_f
|
27
|
+
@threads[i][:wait_time] = data[WAIT_TIME][i].to_f
|
28
|
+
@threads[i][:mpi_busy_time] = data[MPI_BUSY_TIME][i].to_f
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end # class SLATE
|
32
|
+
end # module Hotspots
|
33
|
+
end # module VTune
|
34
|
+
end # module Parser
|
35
|
+
end # module ServerScripts
|
@@ -2,7 +2,7 @@ module ServerScripts
|
|
2
2
|
module Parser
|
3
3
|
module VTune
|
4
4
|
module Hotspots
|
5
|
-
class Starpu <
|
5
|
+
class Starpu < Threads
|
6
6
|
# Get time for a particular event of a particular worker, master thread
|
7
7
|
# or MPI thread. Specify :tid as :CPU_#ID for worker, :MPI for MPI thread,
|
8
8
|
# and :master for the task submission thread.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: server_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Deshmukh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ptools
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- lib/server_scripts/parser/vtune/hotspots.rb
|
103
103
|
- lib/server_scripts/parser/vtune/hotspots/base.rb
|
104
104
|
- lib/server_scripts/parser/vtune/hotspots/threads.rb
|
105
|
+
- lib/server_scripts/parser/vtune/hotspots/threads/slate.rb
|
105
106
|
- lib/server_scripts/parser/vtune/hotspots/threads/starpu.rb
|
106
107
|
- lib/server_scripts/version.rb
|
107
108
|
- server_scripts.gemspec
|