workflow_manager 0.3.7 → 0.3.8
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/lib/workflow_manager/cluster.rb +46 -1
- data/lib/workflow_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b886550f64757d521efa14ad7aa0b3069f8154d6
|
4
|
+
data.tar.gz: 4f0bc2ff94c94b558e7324754d34228bdd0cac55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67d550af640f7e54cb5763ffa7892e95c5e0c6e173674d8238f097e48b891c9051d8e635cd0e85b6336ac966c75fad8fed61cc8879a8a4ed80c078f72a60ada8
|
7
|
+
data.tar.gz: 2bb89597aa0d715fd108a285786741b757c2dbf6fc2c8af5a28bd5646abdd95bcc8a7003d79d9b347e2610ed50f91f857c3a8395a944ed5a4faefc6e4f30ade8
|
@@ -142,7 +142,10 @@ module WorkflowManager
|
|
142
142
|
qstat_flag
|
143
143
|
end
|
144
144
|
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
145
|
-
commands = if now
|
145
|
+
commands = if now == "force"
|
146
|
+
target_file = File.join(dest_parent_dir, File.basename(org_dir))
|
147
|
+
["g-req copynow -f #{org_dir} #{dest_parent_dir}"]
|
148
|
+
elsif now
|
146
149
|
["g-req copynow #{org_dir} #{dest_parent_dir}"]
|
147
150
|
else
|
148
151
|
["g-req -w copy #{org_dir} #{dest_parent_dir}"]
|
@@ -189,4 +192,46 @@ module WorkflowManager
|
|
189
192
|
command = "rm -rf #{target}"
|
190
193
|
end
|
191
194
|
end
|
195
|
+
|
196
|
+
class HydraCluster < Cluster
|
197
|
+
def submit_job(script_file, script_content, option='')
|
198
|
+
# TODO
|
199
|
+
if script_name = File.basename(script_file) and script_name =~ /\.sh$/
|
200
|
+
new_job_script = generate_new_job_script(script_name, script_content)
|
201
|
+
new_job_script_base = File.basename(new_job_script)
|
202
|
+
log_file = File.join(@log_dir, new_job_script_base + "_o.log")
|
203
|
+
err_file = File.join(@log_dir, new_job_script_base + "_e.log")
|
204
|
+
#command = "g-sub -o #{log_file} -e #{err_file} #{option} #{new_job_script}"
|
205
|
+
command = "cat #{new_job_script} |ssh hydra 'cat > #{new_job_script_base}; source /etc/profile; module load cluster/largemem; sbatch #{new_job_script_base};'"
|
206
|
+
job_id = `#{command}`
|
207
|
+
job_id = job_id.match(/Submitted batch job (\d+)/)[1]
|
208
|
+
[job_id, log_file, command]
|
209
|
+
end
|
210
|
+
end
|
211
|
+
def job_running?(job_id)
|
212
|
+
# TODO
|
213
|
+
end
|
214
|
+
def job_ends?(log_file)
|
215
|
+
# TODO
|
216
|
+
end
|
217
|
+
def job_pending?(job_id)
|
218
|
+
# TODO
|
219
|
+
end
|
220
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
221
|
+
# TODO
|
222
|
+
end
|
223
|
+
def kill_command(job_id)
|
224
|
+
# TODO
|
225
|
+
command = "ssh hydra; scancel #{job_id}"
|
226
|
+
end
|
227
|
+
def delete_command(target)
|
228
|
+
# TODO
|
229
|
+
end
|
230
|
+
def cluster_nodes
|
231
|
+
# TODO
|
232
|
+
nodes = {
|
233
|
+
'cluster/largemem' => 'cluster/largemem',
|
234
|
+
}
|
235
|
+
end
|
236
|
+
end
|
192
237
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workflow_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Functional Genomics Center Zurich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|