miga-base 1.2.6.2 → 1.2.6.5
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/miga/cli/action/init/daemon_helper.rb +20 -10
- data/lib/miga/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13f2f36c50de313a8f5f29fc4901d4ce44b37437b3609a730ba5ebeee3053874
|
4
|
+
data.tar.gz: 743e19d52c2b581f2fc4114ded20ec5d3e3a9db19a0647d78b75d97b191b3b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee5c3434107c935b1bb9466127c8c87cac77e58039c787f5049be571d680063e610541da2396630cb9aea7e84083c97eb8d7950fe1a9feec0d58d6dbda61781a
|
7
|
+
data.tar.gz: e46c90206a22308e8a9e3c2ed55eff1cebc9948e98d9b6f7ac9b392edcd461b119a994a0d8170180c03a479903e388c842353b6aafbc079a3176b48019f924df
|
@@ -136,9 +136,9 @@ module MiGA::Cli::Action::Init::DaemonHelper
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def configure_qsub_msub_daemon(v)
|
139
|
-
queue = cli.ask_user('What queue should I use?', nil, nil, true)
|
140
139
|
flavor = v[:type] == 'msub' ? 'msub' :
|
141
140
|
cli.ask_user('Select qsub flavor', 'torque', %w[torque sge])
|
141
|
+
queue = cli.ask_user('What queue should I use?', nil, nil, true)
|
142
142
|
v[:latency] = cli.ask_user('How long should I sleep? (in secs)', '150').to_i
|
143
143
|
v[:maxjobs] = cli.ask_user('How many jobs can I launch at once?', '300').to_i
|
144
144
|
v[:ppn] = cli.ask_user('How many CPUs can I use per job?', '2').to_i
|
@@ -151,8 +151,8 @@ module MiGA::Cli::Action::Init::DaemonHelper
|
|
151
151
|
" {{variables}}: script, vars, cpus, log, task_name, task_name_simple\n ",
|
152
152
|
"#{v[:type]} -q '#{queue}' -v '{{vars}}' -pe openmp {{cpus}} " \
|
153
153
|
"-j y -o '{{log}}' -N '{{task_name_simple}}' -l h_vmem=9g " \
|
154
|
-
"-l h_rt=
|
155
|
-
"perl -pe 's/^Your job (
|
154
|
+
"-l h_rt=12:00:00 '{{script}}' | grep . " \
|
155
|
+
"| perl -pe 's/^Your job (\\S+) .*/$1/'"
|
156
156
|
)
|
157
157
|
else
|
158
158
|
v[:cmd] = cli.ask_user(
|
@@ -172,13 +172,23 @@ module MiGA::Cli::Action::Init::DaemonHelper
|
|
172
172
|
'What should I use to separate variables?', ','
|
173
173
|
)
|
174
174
|
if v[:type] == 'qsub'
|
175
|
-
|
176
|
-
|
177
|
-
"
|
178
|
-
|
179
|
-
|
180
|
-
"
|
181
|
-
|
175
|
+
if flavor == 'sge'
|
176
|
+
v[:alive] = cli.ask_user(
|
177
|
+
"How can I know that a process is still alive?\n" \
|
178
|
+
" Output should be 1 for running and 0 for non-running\n" \
|
179
|
+
" {{variables}}: pid\n ",
|
180
|
+
"qstat -j '{{pid}}' -s pr 2>/dev/null | head -n 1 | wc -l " \
|
181
|
+
"| awk '{print $1}'"
|
182
|
+
)
|
183
|
+
else
|
184
|
+
v[:alive] = cli.ask_user(
|
185
|
+
"How can I know that a process is still alive?\n" \
|
186
|
+
" Output should be 1 for running and 0 for non-running\n" \
|
187
|
+
" {{variables}}: pid\n ",
|
188
|
+
"qstat -f '{{pid}}' | grep ' job_state =' | perl -pe 's/.*= //' " \
|
189
|
+
"| grep '[^C]' | tail -n 1 | wc -l | awk '{print $1}'"
|
190
|
+
)
|
191
|
+
end
|
182
192
|
v[:kill] = cli.ask_user(
|
183
193
|
"How should I terminate tasks?\n" \
|
184
194
|
" {{variables}}: pid\n ",
|
data/lib/miga/version.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA
|
|
12
12
|
# - String indicating release status:
|
13
13
|
# - rc* release candidate, not released as gem
|
14
14
|
# - [0-9]+ stable release, released as gem
|
15
|
-
VERSION = [1.2, 6,
|
15
|
+
VERSION = [1.2, 6, 5].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|