# GPU Access Limited by CGroup

**URL:** <https://community.openpbs.org/t/gpu-access-limited-by-cgroup/735>\
**Category:** Users/Site Administrators\
**Created:** [October 27, 2017, 12:38pm UTC](https://community.openpbs.org/t/gpu-access-limited-by-cgroup/735 "2017-10-27T12:38:37Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Phhere](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/phhere/32/25_2.png) [@Phhere](https://community.openpbs.org/u/Phhere)\
**Post date:** [November 7, 2017, 4:22pm UTC](https://community.openpbs.org/t/gpu-access-limited-by-cgroup/735/6 "2017-11-07T16:22:52Z")

</div>

I think i have read the config file correctly but currently i am failing at importing the hook:

```
[root@hpc-batch14 cgroup]# qmgr
Max open servers: 49
Qmgr: c hook cgroup
Qmgr: import hook cgroup application/x-python default pbs_cgroups.PY
Qmgr: s hook cgroup event=exechost_periodic,exechost_startup,execjob_attach,execjob_begin,execjob_end,execjob_epilogue,execjob_launch
qmgr: Syntax error

```

Mir current Config looks like this:

```
{
    "cgroup_prefix" : "pbspro",
    "exclude_hosts" : [],
    "exclude_vntypes" : [],
    "run_only_on_hosts" : ["hilbert210","hilbert211","hilbert212","hilbert213"],
    "periodic_resc_update" : true,
    "vnode_per_numa_node" : false,
    "online_offlined_nodes" : true,
    "use_hyperthreads" : false,
    "cgroup" : {
        "cpuacct" : {
            "enabled" : true,
            "exclude_hosts" : [],
            "exclude_vntypes" : []
        },
        "cpuset" : {
            "enabled" : true,
            "exclude_hosts" : [],
            "exclude_vntypes" : []
        },
        "devices" : {
            "enabled" : true,
            "exclude_hosts" : [],
            "exclude_vntypes" : [],
            "allow" : [
                "b *:* rwm",
                "c *:* rwm",
                ["nvidiactl", "rwm", "*"],
                ["nvidia-uvm", "rwm"]
            ]
        },
        "hugetlb" : {
            "enabled" : false,
            "exclude_hosts" : [],
            "exclude_vntypes" : [],
            "default" : "0MB",
            "reserve_percent" : "0",
            "reserve_amount" : "0MB"
        },
        "memory" : {
            "enabled" : true,
            "exclude_hosts" : [],
            "exclude_vntypes" : [],
            "soft_limit" : false,
            "default" : "256MB",
            "reserve_percent" : "0",
            "reserve_amount" : "10GB"
        },
        "memsw" : {
            "enabled" : false,
            "exclude_hosts" : [],
            "exclude_vntypes" : ["grey_node"],
            "default" : "256MB",
            "reserve_percent" : "0",
            "reserve_amount" : "1GB"
        }
    }
}
```

---

_[View the full topic](https://community.openpbs.org/t/gpu-access-limited-by-cgroup/735)._
