From 7d08fb8534d920f5fe93a05fac37c3e0425e25a1 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Tue, 18 Mar 2008 20:52:52 +0000
Subject: [PATCH] Replace a couple of abort() calls with reasonable non-fatal
 error

---
 src/plugins/select/cons_res/dist_tasks.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c
index 68c06621862..998e051672b 100644
--- a/src/plugins/select/cons_res/dist_tasks.c
+++ b/src/plugins/select/cons_res/dist_tasks.c
@@ -156,8 +156,10 @@ static int _find_offset(struct select_cr_job *job, const int job_index,
 		}
 	}
 	if (index < 0) {
+		/* This may happen if a node has fewer nodes than
+		 * configured and FastSchedule=2 */
 		error("job_assign_task: failure in computing offset");
-		abort();
+		index = 0;
 	}
 
 	return index * this_cr_node->num_sockets;
@@ -511,7 +513,7 @@ extern int cr_plane_dist(struct select_cr_job *job,
 		if (last_taskcount == taskcount) {
 			/* avoid possible infinite loop on error */
 			error("cr_plane_dist failure");
-			abort();
+			return SLURM_ERROR;
 		}
 	}
 
-- 
GitLab