# How to use --gres=shard:64 in schrodinger submit.yml.erb

**URL:** https://discourse.openondemand.org/t/how-to-use-gres-shard-64-in-schrodinger-submit-yml-erb/3741
**Category:** Get Help
**Created:** [September 15, 2024, 4:21am UTC](https://discourse.openondemand.org/t/how-to-use-gres-shard-64-in-schrodinger-submit-yml-erb/3741 "2024-09-15T04:21:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dai542](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/dai542/32/2669_2.png) [@dai542](https://discourse.openondemand.org/u/dai542)
#### Post date: [September 15, 2024, 4:21am UTC](https://discourse.openondemand.org/t/how-to-use-gres-shard-64-in-schrodinger-submit-yml-erb/3741/1 "2024-09-15T04:21:40Z")

</div>

I have configured [GPU shard](https://slurm.schedmd.com/gres.html#Sharding) in SLURM to allow the GPU to be shared by multiple tasks. I would like to adopt this setup in the configuration file for [Schrodinger’s OOD](https://github.com/OSC/bc_osc_schrodinger). In the script, I can use `#SBATCH --gres=shard:2`. However, when setting `base_slurm_args + ["--gres", "shard:2"]` in `submit.yml.erb`, it gives the error ‘`no GPU device`’. How can I resolve this issue?”

---

<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: [September 16, 2024, 1:02pm UTC](https://discourse.openondemand.org/t/how-to-use-gres-shard-64-in-schrodinger-submit-yml-erb/3741/2 "2024-09-16T13:02:18Z")

</div>

For a `gres` like that, don’t you need `--gpus` flag as well?

Don’t quite know why the directive works when the CLI flag doesn’t - maybe Slurm ignores it?

---

<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: [March 15, 2025, 1:02pm UTC](https://discourse.openondemand.org/t/how-to-use-gres-shard-64-in-schrodinger-submit-yml-erb/3741/3 "2025-03-15T13:02:35Z")

</div>

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