rbbt-util 5.31.4 → 5.31.5

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: 346571583494c278a4499a2ad2bddc248af37176a7acb3a2457af05941b7a074
4
- data.tar.gz: 32539316c53ef634de003ea246e8a649de978f66ea48e9666218eac51f85f4b6
3
+ metadata.gz: 4a455f72e89c6996a19cea23673b6c49f99ffd891bf04b6d0d239fbf79a1897a
4
+ data.tar.gz: d8dd575e2869c014508eaeebe52ef20cc29b6baed79a6d3e7559c9fdd1d8da19
5
5
  SHA512:
6
- metadata.gz: 4636806a9917c98906f492afd57c2b776b9269b97c07ec205d1f6248a1f91ef3a280003e234f4052288b4d959bc16c9121ac8d12effb81973585b2cbbf499301
7
- data.tar.gz: 3ef61d067b36a953fd284954db046607de7050a933461a0ebc8b7096abe9d943527165337cf375b43e5f97d20b2ee27722c603684a4e1e63fb20bec56d57dc13
6
+ metadata.gz: 8613bbffa085f4899e64a5cb71071a061d20f08b479f95d8bc95e9c5abfd5735539a87ee4dddb6ed4822f3acc65d4bac787704e98213b99e4c7922d6ca8a0645
7
+ data.tar.gz: 231dc925d3ae454cadacd5f60f0d7f40d3646df2f7dc00949a7ae5f3e7480f372df06c4c59a3a85d36151d898511eee4c604315aaa2cbae92cf36ffbb1378e7d
@@ -11,30 +11,35 @@ module HPC
11
11
  env_cmd = Misc.process_options options, :env_cmd
12
12
  development = Misc.process_options options, :development
13
13
 
14
+ if contain = options[:contain]
15
+ contain = File.expand_path(contain)
16
+ env_cmd ||= ""
17
+ env_cmd << " TMPDIR='#{contain}/.rbbt/tmp' "
18
+ end
19
+
14
20
  if options[:singularity]
15
21
 
16
22
  group, user, user_group, scratch_group_dir, projects_group_dir = options.values_at :group, :user, :user_group, :scratch_group_dir, :projects_group_dir
17
23
 
18
24
  singularity_img, singularity_opt_dir, singularity_ruby_inline = options.values_at :singularity_img, :singularity_opt_dir, :singularity_ruby_inline
19
25
 
20
- singularity_cmd = %(singularity exec -e -B #{singularity_opt_dir}:/singularity_opt/ -B /apps/)
26
+ singularity_cmd = %(singularity exec -e -B #{singularity_opt_dir}:/singularity_opt/ -B "#{singularity_ruby_inline}":"/.singularity_ruby_inline":rw )
21
27
 
22
- if contain = options[:contain]
23
- contain = File.expand_path(contain)
28
+ if contain && options[:hardened]
24
29
  singularity_cmd << %( -C -H "#{contain}" \
30
+ -B "/.singularity_ruby_inline":"#{contain}/.singularity_ruby_inline":rw
25
31
  -B "#{options[:batch_dir]}" \
26
32
  -B /scratch/tmp \
27
33
  #{ group != user_group ? "-B /gpfs/projects/#{user_group}" : "" } \
28
34
  -B #{scratch_group_dir} \
29
35
  -B #{projects_group_dir} \
30
- -B "#{singularity_ruby_inline}":"#{contain}/.ruby_inline":rw \
36
+ -B /apps/ \
31
37
  -B ~/git:"#{contain}/git":ro \
32
38
  #{Open.exists?('~/.rbbt/software/opt/')? '-B ~/.rbbt/software/opt/:"/opt/":ro' : '' } \
33
39
  -B ~/.rbbt:"#{contain}/home/":ro)
34
- singularity_cmd << " #{singularity_img} "
35
40
  end
36
- env_cmd ||= ""
37
- env_cmd << " TMPDIR='#{contain}/.rbbt/tmp' "
41
+
42
+ singularity_cmd << " #{singularity_img} "
38
43
  end
39
44
 
40
45
  if env_cmd
@@ -170,7 +175,7 @@ EOF
170
175
  batch_options[:wipe_container] ||= 'post'
171
176
  end
172
177
 
173
- if batch_options[:contain] && ! batch_options[:singularity]
178
+ if batch_options[:contain] && ! batch_options[:hardened]
174
179
  options[:workdir_all] = batch_options[:contain]
175
180
  end
176
181
 
@@ -304,7 +309,7 @@ module load singularity
304
309
  mkdir -p "#{singularity_opt_dir}"
305
310
  EOF
306
311
 
307
- if contain
312
+ if contain && options[:hardened]
308
313
 
309
314
  prepare_environment +=<<-EOF
310
315
  # Prepare container for singularity
data/lib/rbbt/hpc/lsf.rb CHANGED
@@ -7,7 +7,8 @@ module HPC
7
7
 
8
8
  def self.batch_system_variables
9
9
  <<-EOF
10
- MAX_MEMORY=$LSB_MAX_MEM_RUSAGE || let MAX_MEMORY="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / 1024"
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"
11
12
  BATCH_JOB_ID=$LSF_JOBID
12
13
  BATCH_SYSTEM=LSF
13
14
  EOF
@@ -99,6 +99,7 @@ class Step
99
99
  if String === value && File.exists?(value)
100
100
  Open.ln_s(value, path)
101
101
  else
102
+ value = value.collect{|v| v = "#{v}" if Path === v; v }if Array === value
102
103
  value = "#{value}" if Path === value
103
104
  Open.write(path + '.yaml', value.to_yaml)
104
105
  end
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.4
4
+ version: 5.31.5
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-03-25 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake