From 9f9b3407603a58d69ace677d39f4ce8579a8ebb2 Mon Sep 17 00:00:00 2001
From: David Bigagli <david@schedmd.com>
Date: Mon, 13 May 2013 16:41:47 -0700
Subject: [PATCH] Introduce the init() and fini() in the gres_gpu plugin. Free
 the global gpu_device global data structure.

---
 src/plugins/gres/gpu/gres_gpu.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/plugins/gres/gpu/gres_gpu.c b/src/plugins/gres/gpu/gres_gpu.c
index 058b42bbac5..631740d70e4 100644
--- a/src/plugins/gres/gpu/gres_gpu.c
+++ b/src/plugins/gres/gpu/gres_gpu.c
@@ -113,6 +113,19 @@ static char	gres_name[]		= "gpu";
 static int *gpu_devices = NULL;
 static int nb_available_files;
 
+extern int init(void)
+{
+	info("%s: %s loaded", __func__, plugin_name);
+
+	return SLURM_SUCCESS;
+}
+extern int fini(void)
+{
+	info("%s: unloading %s", __func__, plugin_name);
+	xfree(gpu_devices);
+
+	return SLURM_SUCCESS;
+}
 /*
  * We could load gres state or validate it using various mechanisms here.
  * This only validates that the configuration was specified in gres.conf.
-- 
GitLab