# pvbatch run on GPU

**URL:** https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441
**Category:** ParaView Support
**Created:** [February 19, 2023, 11:42am UTC](https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441 "2023-02-19T11:42:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Frankx9](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/3e96dc/32.png) [@Frankx9](https://discourse.paraview.org/u/Frankx9)
#### Post date: [February 19, 2023, 11:42am UTC](https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441/1 "2023-02-19T11:42:24Z")

</div>

Hi,

I’m trying to run my pvbatch script on a GPU but with no success, I’m using:

`pvbatch --egl-device-index=$CUDA_VISIBLE_DEVICES test.py`

and I get:

```auto
e[0me[31m( 0.525s) [pvbatch] :0 FATL| Signal: SIGSEGVe[0m
error: exception occurred: Segmentation fault

```

Any idea on how to solve?

Regards

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 20, 2023, 8:08am UTC](https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441/2 "2023-02-20T08:08:24Z")

</div>

What does `$CUDA_VISIBLE_DEVICES` contains ?

---

<div class="post-metadata">

### Author: ![Frankx9](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/3e96dc/32.png) [@Frankx9](https://discourse.paraview.org/u/Frankx9)
#### Post date: [February 20, 2023, 9:17pm UTC](https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441/3 "2023-02-20T21:17:44Z")

</div>

It is pretty strange but the `$CUDA_VISIBLE_DEVICES` is not in my environment when I execute the code, the code is executed via slurm and nvidia module is loaded correctly as well as the GPU but the variable is not setted, is there a way to set it up by myself?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 21, 2023, 8:04am UTC](https://discourse.paraview.org/t/pvbatch-run-on-gpu/11441/4 "2023-02-21T08:04:35Z")

</div>

> [@Frankx9](#):
>
> is there a way to set it up by myself?

Proably, if you know the name of your egl devices.
