From 3cacd764bd93772a437f5f29f1c35ecbc5bb039e Mon Sep 17 00:00:00 2001
From: Alejandro Sanchez <alex@schedmd.com>
Date: Fri, 7 Apr 2017 17:27:19 +0200
Subject: [PATCH] Increase --cpu_bind and --mem_bind length limit to 1024 * 128
 bytes.

So that it is the same max length as in src/common/env.c.

Used for explicitly laying out tasks on large CPU count nodes (e.g., KNL).

Bug 3675.
---
 NEWS                    | 1 +
 src/slurmctld/job_mgr.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index a093e98a949..6ce7e32b9a9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ documents those changes that are of interest to users and administrators.
 
 * Changes in Slurm 17.02.3
 ==========================
+ -- Increase --cpu_bind and --mem_bind field length limits.
 
 * Changes in Slurm 17.02.2
 ==========================
diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index f88a06aeff7..bc846a8f9cb 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -6499,7 +6499,7 @@ static int _test_job_desc_fields(job_desc_msg_t * job_desc)
 	    _test_strlen(job_desc->burst_buffer, "burst_buffer",1024*8) ||
 	    _test_strlen(job_desc->ckpt_dir, "ckpt_dir", 1024)		||
 	    _test_strlen(job_desc->comment, "comment", 1024)		||
-	    _test_strlen(job_desc->cpu_bind, "cpu_bind", 1024)		||
+	    _test_strlen(job_desc->cpu_bind, "cpu_bind", 1024 * 128)	||
 	    _test_strlen(job_desc->dependency, "dependency", 1024*128)	||
 	    _test_strlen(job_desc->features, "features", 1024)		||
 	    _test_strlen(job_desc->gres, "gres", 1024)			||
@@ -6507,7 +6507,7 @@ static int _test_job_desc_fields(job_desc_msg_t * job_desc)
 	    _test_strlen(job_desc->linuximage, "linuximage", 1024)	||
 	    _test_strlen(job_desc->mail_user, "mail_user", 1024)	||
 	    _test_strlen(job_desc->mcs_label, "mcs_label", 1024)	||
-	    _test_strlen(job_desc->mem_bind, "mem_bind", 1024)		||
+	    _test_strlen(job_desc->mem_bind, "mem_bind", 1024 * 128)	||
 	    _test_strlen(job_desc->mloaderimage, "mloaderimage", 1024)	||
 	    _test_strlen(job_desc->name, "name", 1024)			||
 	    _test_strlen(job_desc->network, "network", 1024)		||
-- 
GitLab