uabrc / CRI_XCBC

Home of the XSEDE Compatible Basic Cluster
MIT License
0 stars 1 forks source link

RStudio Updated Error: undefined local variable or method `version' #98

Open flakrat opened 2 years ago

flakrat commented 2 years ago

Error when starting an RStudio Server after the install of ood_updated_rstudio:

undefined local variable or method `version' for #<BatchConnect::SessionContext:0x0000000003183f78>
* The RStudio Server session data for this session can be accessed under the staged root directory.

Per Louis, the fix is to change version.split to r_version.split in roles/ood_updated_rstudio/files/submit.yml

diff --git a/roles/ood_updated_rstudio/files/submit.yml b/roles/ood_updated_rstudio/files/submit.yml
index a2a174c..d292772 100644
--- a/roles/ood_updated_rstudio/files/submit.yml
+++ b/roles/ood_updated_rstudio/files/submit.yml
@@ -8,7 +8,7 @@ script:
     - "--mem-per-cpu=<%= bc_num_mems.blank? ? 4 : bc_num_mems.to_i %>G"
     - "--partition=<%= bc_partition %>"
     - "--time=<%= bc_num_hours.blank? ? 1 : bc_num_hours.to_i %>:00:00"
-    - "--job-name=ood-r-<%= version.split("/")[-1] %>"
+    - "--job-name=ood-r-<%= r_version.split("/")[-1] %>"
 <%- if bc_partition.include? "pascalnodes" -%>
     - "--gres=gpu:1"
 <%- end -%>
flakrat commented 2 years ago

I have made the change manually on the OOD server and confirmed it works

diedpigs commented 2 years ago

Also, the r_version now includes toolchains, e.g. "r_version": "R/4.1.0-foss-2021a", with the current method, user will have job name like: ood-r-4.1.0-foss-2021a, do we want to keep toolchain in the job name or further trim it down to ood-r-4.1.0?