From 977c02cb81b4cc80a671a22bf326a4aed77e0b21 Mon Sep 17 00:00:00 2001
From: jette <jette@schedmd.com>
Date: Thu, 27 Dec 2012 20:14:39 -0800
Subject: [PATCH] Improve srun error handling if launch plugin not found

---
 src/srun/libsrun/opt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/srun/libsrun/opt.c b/src/srun/libsrun/opt.c
index 60e811e80b5..e4790170927 100644
--- a/src/srun/libsrun/opt.c
+++ b/src/srun/libsrun/opt.c
@@ -1741,6 +1741,10 @@ static void _opt_args(int argc, char **argv)
 	bg_figure_nodes_tasks();
 #endif
 
+	if (launch_init() != SLURM_SUCCESS) {
+		fatal("Unable to load launch plugin, check LaunchType "
+		      "configuration");
+	}
 	command_pos = launch_g_setup_srun_opt(rest);
 
 	/* Since this is needed on an emulated system don't put this code in
-- 
GitLab