# I keep getting an srun error when trying to access a GPU

**URL:** <https://ask.cyberinfrastructure.org/t/i-keep-getting-an-srun-error-when-trying-to-access-a-gpu/1438>\
**Category:** Northeastern Research Computing\
**Created:** [July 26, 2020, 6:48pm UTC](https://ask.cyberinfrastructure.org/t/i-keep-getting-an-srun-error-when-trying-to-access-a-gpu/1438 "2020-07-26T18:48:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julia](https://ask.cyberinfrastructure.org/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@Julia](https://ask.cyberinfrastructure.org/u/Julia)\
**Post date:** [July 26, 2020, 6:48pm UTC](https://ask.cyberinfrastructure.org/t/i-keep-getting-an-srun-error-when-trying-to-access-a-gpu/1438/1 "2020-07-26T18:48:48Z")

</div>

I am using the recommended srun command to access GPU node. However, I keep getting the error “srun: error: Unable to create step for job 12702868: Invalid generic resource (gres) specification”. Do you know how I can avoid this error?

---

<div class="post-metadata">

**Author:** ![rohin](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/rohin/32/495_2.png) [@rohin](https://ask.cyberinfrastructure.org/u/rohin)\
**Post date:** [July 28, 2020, 10:12pm UTC](https://ask.cyberinfrastructure.org/t/i-keep-getting-an-srun-error-when-trying-to-access-a-gpu/1438/2 "2020-07-28T22:12:00Z")

</div>

This might due to requesting srun job from within a compute node. Please make sure you are running your srun command from a login node.
