pwrake 2.2.9 → 2.3.0
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 +5 -2
- data/lib/pwrake/branch/communicator_set.rb +1 -1
- data/lib/pwrake/master/master.rb +16 -13
- data/lib/pwrake/option/host_map.rb +11 -25
- data/lib/pwrake/option/option.rb +6 -3
- data/lib/pwrake/option/option_default_filesystem.rb +1 -1
- data/lib/pwrake/option/option_gfarm2fs.rb +1 -1
- data/lib/pwrake/queue/locality_aware_queue.rb +77 -84
- data/lib/pwrake/queue/non_locality_queue.rb +72 -0
- data/lib/pwrake/queue/queue_array.rb +75 -312
- data/lib/pwrake/queue/task_queue.rb +54 -91
- data/lib/pwrake/report/parallelism.rb +4 -6
- data/lib/pwrake/task/task_algorithm.rb +1 -0
- data/lib/pwrake/task/task_property.rb +49 -21
- data/lib/pwrake/task/task_wrapper.rb +17 -4
- data/lib/pwrake/version.rb +1 -1
- data/lib/pwrake/worker/executor.rb +1 -0
- data/lib/pwrake/worker/gfarm_directory.rb +38 -6
- data/lib/pwrake/worker/shared_directory.rb +3 -0
- metadata +3 -2
@@ -73,19 +73,51 @@ module Pwrake
|
|
73
73
|
|
74
74
|
def close
|
75
75
|
super
|
76
|
-
|
76
|
+
n = 0
|
77
|
+
while n < 4
|
77
78
|
begin
|
78
|
-
|
79
|
-
|
79
|
+
if mounted?
|
80
|
+
sleep 0.15 * 4**n
|
81
|
+
spawn_cmd "fusermount -u #{@gfarm_mountpoint}"
|
82
|
+
end
|
83
|
+
n = 99
|
84
|
+
rescue => e
|
85
|
+
@log.error e.message+" n=#{n}"
|
86
|
+
n += 1
|
80
87
|
end
|
81
|
-
|
88
|
+
end
|
89
|
+
if File.directory? @gfarm_mountpoint
|
82
90
|
begin
|
83
91
|
FileUtils.rmdir @gfarm_mountpoint
|
84
|
-
@log.info "rmdir #{@gfarm_mountpoint}
|
92
|
+
@log.info "rmdir #{@@hostname}:#{@gfarm_mountpoint}"
|
85
93
|
rescue
|
86
|
-
@log.error "failed to rmdir #{@gfarm_mountpoint}
|
94
|
+
@log.error "failed to rmdir #{@@hostname}:#{@gfarm_mountpoint}"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
if File.exist? @gfarm_mountpoint
|
98
|
+
@log.warn "mountpoint #{@@hostname}:#{@gfarm_mountpoint} remains"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def mounted?
|
103
|
+
File.open('/etc/mtab','r') do |f|
|
104
|
+
f.each_line do |l|
|
105
|
+
a = l.split
|
106
|
+
if a[1] == @gfarm_mountpoint && a[2] =~ /gfarm2fs/
|
107
|
+
return true
|
108
|
+
end
|
87
109
|
end
|
88
110
|
end
|
111
|
+
false
|
112
|
+
end
|
113
|
+
|
114
|
+
def check_mountpoint
|
115
|
+
# try to recover from gfarm2fs segfault
|
116
|
+
unless File.directory?(@gfarm_mountpoint)
|
117
|
+
@log.warn "remounting #{@@hostname}:#{@gfarm_mountpoint}"
|
118
|
+
close
|
119
|
+
open
|
120
|
+
end
|
89
121
|
end
|
90
122
|
|
91
123
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro TANAKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Parallel and distributed Rake for workflow execution on multicores, clusters,
|
14
14
|
clouds using SSH. It has locality-aware scheduling designed for Gfarm file system.
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- lib/pwrake/option/option_gfarm2fs.rb
|
63
63
|
- lib/pwrake/queue/locality_aware_queue.rb
|
64
64
|
- lib/pwrake/queue/no_action_queue.rb
|
65
|
+
- lib/pwrake/queue/non_locality_queue.rb
|
65
66
|
- lib/pwrake/queue/queue_array.rb
|
66
67
|
- lib/pwrake/queue/task_queue.rb
|
67
68
|
- lib/pwrake/report.rb
|