Skip to content

Instantly share code, notes, and snippets.

View pastewka's full-sized avatar

Lars Pastewka pastewka

View GitHub Profile
@pastewka
pastewka / get_free_cuda_devices.c
Last active December 26, 2015 19:48
Print a list of free CUDA devices on screen. This is useful to select a free GPU in a job submission script.
/* ======================================================================
Copyright (2013) Lars Pastewka
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of