Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion BrainPortal/app/models/cluster_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,12 @@ def submit_cluster_job
io.write( science_script )
end

# Copy the runtime_info.sh script
rt_info_script = "#{Rails.root.to_s.bash_escape}/vendor/cbrain/bin/runtime_info.sh"
if File.exists?(rt_info_script) && ! File.exists?(".runtime_info.sh")
FileUtils.copy(rt_info_script, ".runtime_info.sh")
end

# Create the QSUB wrapper script which is going to be submitted
# to the cluster.
qsub_script = <<-QSUB_SCRIPT
Expand Down Expand Up @@ -1865,7 +1871,9 @@ def submit_cluster_job
date '+CBRAIN Task Starting At %s : %F %T' 1>&2

# Record runtime environment
bash #{Rails.root.to_s.bash_escape}/vendor/cbrain/bin/runtime_info.sh > #{runtime_info_basename}
if test -e .runtime_info.sh ; then
bash .runtime_info.sh > #{runtime_info_basename}
end

# With apptainer/singularity jobs, we sometimes get an error booting the container,
# so we try up to five times.
Expand Down
Loading