rbbt-util 5.31.15 → 5.32.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9616d2b1893ed3444d432e99b4ef6ddaf7d61836ee1c23dbd4deb1efa767b80d
4
- data.tar.gz: c5dc433a171c909eb2711ee37832fb094d271fcf6099f0394706af3cd8da1520
3
+ metadata.gz: ef9271207cbe69c725a4ab3a8553295d3b68e5f04ec1bfd25ad4654f162ed9cb
4
+ data.tar.gz: '087009c9ac6b4fee6d9fa7bceb003e050a0cc1e73f96987ec792c07388760633'
5
5
  SHA512:
6
- metadata.gz: efe3b9c85ec947f900283ca4b2a3e651617558bfd7d85dbea80180ad377e18150df8fccde9efecdd2493d9e4f0ed7979dbdefe2f815e2480d910d5e507670422
7
- data.tar.gz: 24bc0e0e6dda34cbf7ad4ea08cb1cbeb18b3bb55b42a79a4590183fd86e7247d7aeb648c31673ef5601f632828d71ae29594e3c6b8f5c7c860dab6592a373f68
6
+ metadata.gz: b031c1143992b4c75eeeabcb231d656af2927a5bc46a0ea3527c4c90b7ffcc5eb44b0ec02ef9e31d4879fcf2b3192165ba5b22cd1978dc5250eec355f2556bdc
7
+ data.tar.gz: eb43875132a5f4ddc7ff9ae5dcaed7677c6bff84a4d61454cad9a83361d2a3dd63432cd5b28c656cd9e7bb589b8517bbdd3b57c0fa370527724d3ae55810b0cb
data/lib/rbbt/hpc/lsf.rb CHANGED
@@ -7,10 +7,13 @@ module HPC
7
7
 
8
8
  def self.batch_system_variables
9
9
  <<-EOF
10
- [[ -z $LSB_MAX_MEM_RUSAGE ]] || MAX_MEMORY=$LSB_MAX_MEM_RUSAGE
11
- [[ -z $MAX_MEMORY ]] && let MAX_MEMORY="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / 1024"
12
- BATCH_JOB_ID=$LSF_JOBID
13
- BATCH_SYSTEM=LSF
10
+ let TOTAL_PROCESORS="$(cat /proc/cpuinfo|grep ^processor |wc -l)"
11
+ let MAX_MEMORY_DEFAULT="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / ( (1024 * $TOTAL_PROCESORS) / $SLURM_CPUS_PER_TASK )"
12
+ [ ! -z $LSB_MAX_MEM_RUSAGE ] && let MAX_MEMORY="$LSB_MAX_MEM_RUSAGE" || MAX_MEMORY="$MAX_MEMORY_DEFAULT"
13
+ export MAX_MEMORY_DEFAULT
14
+ export MAX_MEMORY
15
+ export BATCH_JOB_ID=$LSF_JOBID
16
+ export BATCH_SYSTEM=LSF
14
17
  EOF
15
18
  end
16
19
 
@@ -8,7 +8,8 @@ module HPC
8
8
 
9
9
  def self.batch_system_variables
10
10
  <<-EOF
11
- let MAX_MEMORY_DEFAULT="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / ( 1024 * $(nproc) / $SLURM_CPUS_PER_TASK )"
11
+ let TOTAL_PROCESORS="$(cat /proc/cpuinfo|grep ^processor |wc -l)"
12
+ let MAX_MEMORY_DEFAULT="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / ( (1024 * $TOTAL_PROCESORS) / $SLURM_CPUS_PER_TASK )"
12
13
  [ ! -z $SLURM_MEM_PER_CPU ] && let MAX_MEMORY="$SLURM_MEM_PER_CPU * $SLURM_CPUS_PER_TASK" || MAX_MEMORY="$MAX_MEMORY_DEFAULT"
13
14
  export MAX_MEMORY_DEFAULT
14
15
  export MAX_MEMORY
@@ -458,6 +458,10 @@ class Step
458
458
  end
459
459
 
460
460
  def clean
461
+ if ! Open.exists?(info_file)
462
+ Log.high "Refusing to clean step with no .info file: #{path}"
463
+ return self
464
+ end
461
465
  status = []
462
466
  status << "dirty" if done? && dirty?
463
467
  status << "not running" if ! done? && ! running?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.31.15
4
+ version: 5.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-14 00:00:00.000000000 Z
11
+ date: 2021-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake