rbbt-util 5.25.13 → 5.25.14

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rbbt +9 -0
  3. data/lib/rbbt/hpc.rb +8 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d21f381f833d879e793fce0267d911fcf66db61c
4
- data.tar.gz: d2b90c81869aaf9003d50e37efff5caf9ecfb909
3
+ metadata.gz: e5aabac2c8c621d8ee26f59822fdb44044de2150
4
+ data.tar.gz: 2bc06d77e9770da322089b495807c7b9478dcd19
5
5
  SHA512:
6
- metadata.gz: be3c9ac08a4f4c2e3fd27722589059ccb37c5c770e1720e3d58ce00e602e8eaec2bc4e4814a9a66216d4d6c28b89b510304603cc8e5e1549e019f37c348cfbfa
7
- data.tar.gz: 712babf335eddc03bcc4c5415354fe6aecc9cb8f5fbb4a7f5dd4be6358bc7e778eeee043028e58a4071b76ec6ae92f424acf7c0879da5d3757a44429c829b3e1
6
+ metadata.gz: f99b7a4494a17ef70af8a9cd26fdaa7b835745b6f12d5a90103eab67de9c7621f0694c4a9e067be0d932e906839bb12cf16f99b42d060323460e8b896e02bda4
7
+ data.tar.gz: b601014d631449cfd2363461f9aa83f590fc4998ecd14ddc0fb4f21d7b6577e6015c9b33f15e57881dc82d8c7c94d241665723c46246db79c674c105e3aee9b0
data/bin/rbbt CHANGED
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ class CmdStop < Exception
4
+ attr_accessor :exit_status
5
+ def initialize(exit_status = 0)
6
+ @exit_status = exit_status
7
+ end
8
+ end
3
9
  dev_dir = nil
4
10
  if _i = ARGV.index("--dev")
5
11
  dev_dir = ARGV[_i+1]
@@ -248,6 +254,9 @@ rescue ParameterException
248
254
  puts
249
255
  exit -1
250
256
  rescue SystemExit
257
+ rescue CmdStop
258
+ exit_status = $!.exit_status
259
+ exit exit_status
251
260
  rescue Exception
252
261
  Log.exception $!
253
262
  exit -1
data/lib/rbbt/hpc.rb CHANGED
@@ -3,6 +3,13 @@ require 'rbbt/util/cmd'
3
3
 
4
4
  module Marenostrum
5
5
  SERVER='mn1'
6
+ class SBATCH < Exception;
7
+ attr_accessor :directory
8
+ def initialize(directory)
9
+ @directory = directory
10
+ end
11
+ end
12
+
6
13
  module SLURM
7
14
 
8
15
  def self.template(args, options = {})
@@ -256,10 +263,8 @@ EOF
256
263
  if File.exists?(fout)
257
264
  return
258
265
  elsif dry_run
259
- STDERR.puts Log.color(:magenta, "Prepared work directory: ")
260
- puts workdir
261
266
  STDERR.puts Log.color(:magenta, "To execute run: sbatch '#{workdir}/command.slurm'")
262
- Kernel.exit! -2
267
+ raise Marenostrum::SBATCH, workdir
263
268
  else
264
269
  Open.rm fsync
265
270
  Open.rm fexit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.25.13
4
+ version: 5.25.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez