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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dd2a47d0472b27985d65865358d2555f67f18e63143d41b62d2a36b83edddc6
4
- data.tar.gz: b90dc62b2bddcd3903493abe84b663486b57170b7b4fd65a5f63d0bf36e747b2
3
+ metadata.gz: 13f2f36c50de313a8f5f29fc4901d4ce44b37437b3609a730ba5ebeee3053874
4
+ data.tar.gz: 743e19d52c2b581f2fc4114ded20ec5d3e3a9db19a0647d78b75d97b191b3b08
5
5
  SHA512:
6
- metadata.gz: f2b4507f9526471e64e17fc115918dcf880a0c4dfedebe111fcb98c24a7bede321b629809d8518f1bb93cb0d1c0f524bcb707309f891ee09569dd43ecc527f97
7
- data.tar.gz: bf0f77f5d7879d27b5e1fb22b32a1ba42da8f41318ebdfefc92b35782ceb8538687de05647296afc6eb74d284729a73fba60520e288d33d049a7ece6e7d81de9
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=walltime=12:00:00 '{{script}}' | grep . | " \
155
- "perl -pe 's/^Your job (\S+) .*/$1/'"
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
- v[:alive] = cli.ask_user(
176
- "How can I know that a process is still alive?\n" \
177
- " Output should be 1 for running and 0 for non-running\n" \
178
- " {{variables}}: pid\n ",
179
- "qstat -f '{{pid}}' | grep ' job_state =' | perl -pe 's/.*= //' " \
180
- "| grep '[^C]' | tail -n 1 | wc -l | awk '{print $1}'"
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, 2].freeze
15
+ VERSION = [1.2, 6, 5].freeze
16
16
 
17
17
  ##
18
18
  # Nickname for the current major.minor version.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miga-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6.2
4
+ version: 1.2.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis M. Rodriguez-R