rbbt-util 5.26.113 → 5.26.114

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/hpc.rb +12 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83f40258d1d38cb0d6634a6308493744a9a592d7d1b6959be3fc164e82336408
4
- data.tar.gz: dca772b872b127233434d142720cdc4f05d32249fbb7c3480b6e97962b00b196
3
+ metadata.gz: 4f667fc42ef878fae10593c1ce3120644484bcd780f9992feac6d8f62eb20450
4
+ data.tar.gz: 5090c55a43b7487b2978d55f753ed79dc6d0dc389ccf915fdf0583e084ea4ea7
5
5
  SHA512:
6
- metadata.gz: bff5962be51bf052a8fc04a1f6cd079008e58eea1c4c4edc3dee7055c75e080e044016c3a8d504d60815e2e955aca24fd1c97a077d4e0416f81ca659024aea77
7
- data.tar.gz: d47aa8877cca49c7dca4e9489161ba7024bfc6cf5cb217c563def1cdafdbd66892f085fa26f696ef7436e4cd3bb6e3d4b3e8107dfb334389b1c4384806b7a988
6
+ metadata.gz: bc8909d45725ca94c35ddf01a635fc92810f9cb90238045c0ba0bb9ead8a8937f5ab09b6c0a5cf7a87e42ec173ba5fb037035964d5ba4568e4259975a2f8832d
7
+ data.tar.gz: 20b90ae10e1012b768ad6c3127a52e3a0c8686ae9f97d3232e0294baadeedf73022a76c0e413921d9ddd2a8400f3141925773c16a4fd2ad0acfa46380bdad378
data/lib/rbbt/hpc.rb CHANGED
@@ -146,11 +146,13 @@ SINGULARITY_RUBY_INLINE="$HOME/.singularity_ruby_inline"
146
146
  mkdir -p "$SINGULARITY_RUBY_INLINE"
147
147
  EOF
148
148
 
149
+ prep = ""
150
+
149
151
  if contain
150
152
  scratch_group_dir = File.join('/gpfs/scratch/', group)
151
153
  projects_group_dir = File.join('/gpfs/projects/', group)
152
154
 
153
- env +=<<-EOF
155
+ prep +=<<-EOF
154
156
 
155
157
  # Prepare container dir
156
158
  CONTAINER_DIR="#{contain}"
@@ -178,15 +180,15 @@ echo "user_scratch: #{scratch_group_dir}/#{user}/{PKGDIR}/{TOPLEVEL}/{SUBPATH}"
178
180
  EOF
179
181
 
180
182
  if user_group && group != user_group
181
- env +=<<-EOF
183
+ prep +=<<-EOF
182
184
 
183
185
  # Add user_group search_path
184
186
  echo "#{user_group}: /gpfs/projects/#{user_group}/{PKGDIR}/{TOPLEVEL}/{SUBPATH}" >> $CONTAINER_DIR/.rbbt/etc/search_paths
185
- EOF
187
+ EOF
186
188
  end
187
189
 
188
190
  if inputs_dir
189
- env +=<<-EOF
191
+ prep +=<<-EOF
190
192
 
191
193
  # Copy inputs
192
194
  [[ -d '#{inputs_dir}' ]] && cp -R '#{inputs_dir}' $CONTAINER_DIR/inputs
@@ -195,7 +197,7 @@ echo "#{user_group}: /gpfs/projects/#{user_group}/{PKGDIR}/{TOPLEVEL}/{SUBPATH}"
195
197
  end
196
198
 
197
199
  if copy_image
198
- env +=<<EOF
200
+ prep +=<<EOF
199
201
 
200
202
  # Copy image
201
203
  rsync -avz "$SINGULARITY_IMG" "$CONTAINER_DIR/rbbt.singularity.img" 1>&2
@@ -205,7 +207,7 @@ EOF
205
207
 
206
208
  if wipe_container == "pre" || wipe_container == "both"
207
209
  if singularity
208
- env +=<<-EOF
210
+ prep +=<<-EOF
209
211
 
210
212
  # Clean container pre
211
213
  singularity exec -e -C -H "$CONTAINER_DIR" "$SINGULARITY_IMG" rm -Rfv .rbbt/var/jobs &>> #{fsync}
@@ -300,8 +302,8 @@ find '#{target}' -type l -ls | awk '$13 ~ /^#{target.gsub('/','\/')}/ { sub("#{s
300
302
  EOF
301
303
 
302
304
  if contain && (wipe_container == "post" || wipe_container == "both")
303
- run =<<-EOF + run
304
- if ls -A '#{contain}'; then
305
+ prep =<<-EOF + prep
306
+ if ls -A '#{contain}' > /dev/null ; then
305
307
  echo "ERROR: Container directory not empty, refusing to wipe. #{contain}"
306
308
  fi
307
309
  EOF
@@ -342,7 +344,7 @@ else
342
344
  fi
343
345
  EOF
344
346
 
345
- template = [header, env, run, coda] * "\n"
347
+ template = [header, env, prep, run, coda] * "\n"
346
348
 
347
349
  template
348
350
  end
@@ -482,7 +484,7 @@ EOF
482
484
  slurm_basedir = options.delete :SLURM_basedir
483
485
  slurm_basedir = "~/rbbt-slurm" if slurm_basedir.nil?
484
486
  TmpFile.with_file(nil, !keep_slurm_basedir, :tmpdir => slurm_basedir, :prefix => "SLURM_rbbt_job-") do |tmp_directory|
485
- options[:slurm_basedir] ||= File.join(tmp_directory, 'workdir')
487
+ options[:slurm_basedir] ||= tmp_directory
486
488
  slurm_basedir = options[:slurm_basedir]
487
489
  inputs_dir = File.join(tmp_directory, 'inputs_dir')
488
490
  saved = Step.save_job_inputs(job, inputs_dir, options)
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.26.113
4
+ version: 5.26.114
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake