# \[OnDemand 3.1 / Slurm\] Increase Number of Cores & Memory for Jupyter App

**URL:** <https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094>\
**Category:** Get Help\
**Tags:** question\
**Created:** [March 5, 2025, 10:13pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094 "2025-03-05T22:13:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 5, 2025, 10:13pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/1 "2025-03-05T22:13:08Z")

</div>

Hey All,

So I am having some difficulty at the moment. Users are requesting that my Jupyer app start setting SLURM’s Number of Cores & Max Memory traits. However, the default `bc_*` fields don’t really help with this (and on a different note, I cannot get any of the `auto_*` options working despite turning on the feature and updating the ood-portal).

The documentation is a tad confusing regarding how to set things up since it seems `bc_num_slot` is for some reason set to SLURM’s Number of Nodes (though it isn’t stated anywhere that it is). Crawling through these posts, it seems I need to set up my own `cores` parameter. However, when I do so, it doesn’t actually change anything despite the fields being present.

Do I need to rebuild things with some command that I am missing?

Thanks in advance for the help!

~ Joe G.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 6, 2025, 3:18pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/2 "2025-03-06T15:18:51Z")

</div>

> [@JPGlaser](#):
>
> Crawling through these posts, it seems I need to set up my own `cores` parameter. However, when I do so, it doesn’t actually change anything despite the fields being present.

When you define something, you have to use it in the `submit.yml.erb`.

You can see this example here of how using `num_cores` in the form.yml is turned into sbatch arguments.

> <https://github.com/OSC/bc_osc_comsol/blob/master/submit.yml.erb>

---

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 10, 2025, 5:03pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/3 "2025-03-10T17:03:40Z")

</div>

Hey Jeff,

Thanks for that document. However, I am a bit unsure as to where this would live locally? Is this a once defined I don’t have to define it again? It seems odd that OnDemand doesn’t support this kind of thing natively when you select what kind of Job Manager you have in the main config file.

~ Joe G.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 10, 2025, 5:27pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/4 "2025-03-10T17:27:31Z")

</div>

> [@JPGlaser](#):
>
> It seems odd that OnDemand doesn’t support this kind of thing natively when you select what kind of Job Manager you have in the main config file.

Are you talking about Interactive Applications that OnDemand uses or are you talking about the 3rd party application Open Composer? I can’t speak to the latter as I’m not the developer for that application.

---

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 10, 2025, 5:41pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/5 "2025-03-10T17:41:30Z")

</div>

Hello Jeff,

I am talking Interactive Applications. Apologies, its been quite a while since I did any active work with our OnDemand instance as after initial configuration was done, it has been nearly a “set it, and forget it” instance.

I’m just trying to figure out exactly what files need to be edited to ensure that, when using SLURM as the job manager, users that start up an Interactive Jupyter Notebook (using the basic YAML) can set the number of CPUs per Node ($SLURM\_TASKS\_PER\_NODE) so that we don’t have users accidentally stepping on each other’s feet when they need to run more advanced Notebooks workloads (such as MCMC runs which benefit from \>2 threads).

~ Joe G.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 10, 2025, 5:44pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/6 "2025-03-10T17:44:56Z")

</div>

> [@JPGlaser](#):
>
> However, I am a bit unsure as to where this would live locally?

Got it, this documentation page goes over the file structure that is an app. `submit.yml.erb` being in the root directory of the application.

> **[Interactive Apps — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive.html)**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/6/6c57f7ccabd0a6604ca9c54e63c02d4dc4880eda.png)

---

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 10, 2025, 5:53pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/7 "2025-03-10T17:53:09Z")

</div>

Right, though I am still on Open OnDemand 3.1 as we haven’t migrated yet to 4.0. I think what is confusing me is where it all lives. The `/etc/ood/confing/apps` directory is not where applications were placed originally, except for `bc_desktop`. I assume the directory that is being used is `/var/www/ood/apps/sys/jupyter/` which looks like:

```auto
ls /var/www/ood/apps/sys/jupyter/
CHANGELOG.md  
form.yml  
icon.png  
LICENSE.txt  
manifest.yml  
README.md  
submit.yml.erb  
template  
view.html.erb

```

I am unfamiliar with they syntax used in the `.erb` section of the file you linked above. What language is this and is there documentation regarding this?

As an additional note, I cannot get any of the `auto_*` options to work in my `forms.yml` despite turning on the feature. Is there some sort of a rebuild command I am not running?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 10, 2025, 6:00pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/8 "2025-03-10T18:00:50Z")

</div>

ERB is embedded ruby. Basically `<%- make_some_computation -%>` for basic computations and `<%= return_some_string %>` that results in a string. I.e., they’re dynamic YAML files after they’re processed.

The `/etc` vs. `/var` thing is sub-apps. The ability to reconfigure existing applications. I’d suggest you forget about `/etc` and focus on your app in `/var`.

> **[Sub-Apps and Re-configuring existing apps — Open OnDemand 4.0.0 documentation](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/sub-apps.html)**

> [@JPGlaser](#):
>
> As an additional note, I cannot get any of the `auto_*` options to work in my `forms.yml` despite turning on the feature. Is there some sort of a rebuild command I am not running?

Ummmm maybe inspect the HTML to see if there are hidden options as well. It may be the case that they’re there just hidden for some reason or another.

You can also check your `/var/log/ondemand-nginx/$USER/error.log` to see the actual commands you’re issuing. IIRC it’s `sacct` or `sacctmgr` or `scontrol`?

---

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 13, 2025, 4:51pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/9 "2025-03-13T16:51:59Z")

</div>

> [@jeff.ohrstrom](#):
>
> dynamic

Apologies for the delay, been working on some other projects. RE the `auto_*` selections, this is what things look like (just text fillable fields).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/f/fa14fe10464bd3f0d892e9d35bd52d19ce82e83b.png)

```auto
cluster: "link"
attributes:
  modules: "python/3.10 pulsar"
  extra_jupyter_args: ""
form:
  - modules
  - extra_jupyter_args
  - auto_account
  - auto_queue
  - bc_num_hours
  - bc_num_slots
  - bc_email_on_started

```

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 14, 2025, 2:17pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/10 "2025-03-14T14:17:49Z")

</div>

It’s plural `auto_accounts` with an `s`.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [March 14, 2025, 2:18pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/11 "2025-03-14T14:18:09Z")

</div>

Same for `auto_queues`.

---

<div class="post-metadata">

**Author:** ![JPGlaser](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jpglaser/32/967_2.png) [@JPGlaser](https://discourse.openondemand.org/u/JPGlaser)\
**Post date:** [March 14, 2025, 7:22pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/12 "2025-03-14T19:22:00Z")

</div>

That was indeed the issue (regarding the `s`). Those are now working correctly AND I have gotten the hang of erb enough to get the cores set up specifically thanks to your examples. Much appreciated.

On a similar note, is it possible to add a field for users to rename their Jupyter session that is displayed at the top of their Interactive Jobs list? For example, I have some users that are doing workflows that best work if they can have multiple SLURM interactive jobs across the cluster for timing specific pulsars all at the same time.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/2/26d6d8a0343d7848129cc6581fee44f5d1030233.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [September 10, 2025, 7:22pm UTC](https://discourse.openondemand.org/t/ondemand-3-1-slurm-increase-number-of-cores-memory-for-jupyter-app/4094/13 "2025-09-10T19:22:17Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
