# No implicit conversion of Hash into Array when trying to submit RStudio or Matlab session

**URL:** <https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163>\
**Category:** Get Help\
**Created:** [January 31, 2019, 5:39pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163 "2019-01-31T17:39:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yzung3942](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yzung3942](https://discourse.openondemand.org/u/yzung3942)\
**Post date:** [January 31, 2019, 5:39pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/1 "2019-01-31T17:39:28Z")

</div>

Dear all,

I successfully added both apps:

- [https://github.com/OSC/bc\_osc\_rstudio\_server](https://github.com/OSC/bc_osc_rstudio_server)
- [https://github.com/OSC/bc\_osc\_matlab](https://github.com/OSC/bc_osc_matlab)

However, when trying to launch a session for any of the two I get:

Failed to submit session with the following error:  
no implicit conversion of Hash into Array

at

http:///pun/sys/dashboard/batch\_connect/dev/Matlab/session\_contexts

respectively

http://\</pun/sys/dashboard/batch\_connect/sys/RStudio/session\_contexts

Could you help me with resolving this issue, thanks in advance!

Cheers,  
Tom

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 1, 2019, 3:30am UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/2 "2019-02-01T03:30:42Z")

</div>

Are you using Torque or Slurm? If you are using any other adapter but Torque you should convert the value of the “native” key in the submit.yml.erb to an array.

> <https://github.com/OSC/bc_osc_matlab/blob/bb8c3a0a785ecfb4c922326d2c253112712cfde6/submit.yml.erb#L11-L13>

All of the adapters support specifying an array of “native” command line arguments you would pass to the submit command (whether that be sbatch or qsub or bsub etc.). You would replace spaces with commas and put quotes around each argument (i.e. `native: ["-d", "after:1234.myjob"]`)

Only the Torque adapter also supports a hash - this difference goes back to a time when we only had Torque (since thats what we currently use at OSC) and had an adapter using the C library.

I might need to call this out in the documentation. If what I’m suggesting is the problem, would adding a warning to [https://osc.github.io/ood-documentation/master/install-ihpc-apps.html](https://osc.github.io/ood-documentation/master/install-ihpc-apps.html) be helpful. Or better yet, just update OSC’s apps to use the array-style arguments so that they work.

Long term we need to add a sensible abstraction to specifying resources like nodes and cores when we submit a job - then we could drop using “native” in these apps and the OSC specific ones would become more generic.

---

<div class="post-metadata">

**Author:** ![yzung3942](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yzung3942](https://discourse.openondemand.org/u/yzung3942)\
**Post date:** [February 1, 2019, 5:52pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/3 "2019-02-01T17:52:54Z")

</div>

im using slurm.  
and my submit.yml.erb is exactly as it’s displayed on the link, including lines 11-13.  
still the same error message…

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 22, 2019, 3:40pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/4 "2019-02-22T15:40:53Z")

</div>

Have you solved your problem or are you still having difficulties here?

The matlab app is Torque specific. The `bc_num_slots` is a special attribute that for Slurm adds `-N 1` (or whatever number of nodes specified) so you should just delete the entire script section from submit.yml.erb

Of course you would also delete the ppn and num\_cores etc from the form.yml since they wouldn’t be used. Unless you were wanting to offer control over those when submitting the job.

---

<div class="post-metadata">

**Author:** ![at8036](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@at8036](https://discourse.openondemand.org/u/at8036)\
**Post date:** [October 18, 2019, 3:23pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/5 "2019-10-18T15:23:33Z")

</div>

I found that I had to use different formatting altogether to get things working for me. I was also getting the above error while troubleshooting. This thread has my solution that may be helpful for someone in the future:

> [@Creating Memory and GPU Attribute for Jupyter](https://discourse.openondemand.org/t/creating-memory-and-gpu-attribute-for-jupyter/554):
>
> Hello, I would like to add memory and GPU attributes to the launcher form and am struggling to figure out how to do it. I used the info from the below thread to add the widgets, but I’m not sure where I need to configure the back end to utilize the selections upon job launch. Any info would be greatly appreciated! Thanks, Aragorn.

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:24pm UTC](https://discourse.openondemand.org/t/no-implicit-conversion-of-hash-into-array-when-trying-to-submit-rstudio-or-matlab-session/163/6 "2022-05-26T15:24:11Z")

</div>


