From 0074589fb17c8d065f649f9b275b5e6b3722d785 Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Thu, 3 Nov 2016 17:34:17 -0700
Subject: [PATCH] Remove CLUSTER_FLAG_AIX and related code blocks.

---
 slurm/slurmdb.h              |  1 +
 src/common/env.c             | 26 --------------------------
 src/common/working_cluster.c |  9 ---------
 3 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/slurm/slurmdb.h b/slurm/slurmdb.h
index cb1ffb81792..106a809f71d 100644
--- a/slurm/slurmdb.h
+++ b/slurm/slurmdb.h
@@ -194,6 +194,7 @@ enum cluster_fed_states {
 				       /* Removed v16.05 */
 #define CLUSTER_FLAG_XCPU   0x00000020 /* This has xcpu, removed v15.08 */
 #define CLUSTER_FLAG_AIX    0x00000040 /* This is an aix cluster */
+				       /* Removed v17.02 */
 #define CLUSTER_FLAG_MULTSD 0x00000080 /* This cluster is multiple slurmd */
 #define CLUSTER_FLAG_CRAYXT 0x00000100 /* This cluster is a ALPS cray
 					* (deprecated) Same as CRAY_A */
diff --git a/src/common/env.c b/src/common/env.c
index 0e9e1fed704..6d981e846ec 100644
--- a/src/common/env.c
+++ b/src/common/env.c
@@ -141,9 +141,6 @@ static int _setup_particulars(uint32_t cluster_flags,
 			verbose("Can't set BASIL_RESERVATION_ID "
 			        "environment variable");
 		}
-
-	} else if (cluster_flags & CLUSTER_FLAG_AIX) {
-		setenvf(dest, "LOADLBATCH", "%s", "yes");
 	}
 
 	return rc;
@@ -786,27 +783,6 @@ int setup_env(env_t *env, bool preserve_env)
 		rc = SLURM_FAILURE;
 	}
 
-	if (cluster_flags & CLUSTER_FLAG_AIX) {
-		char res_env[128];
-		char *debug_env = (char *)getenv("SLURM_LL_API_DEBUG");
-		int  debug_num = 0;
-
-		/* MP_POERESTART_ENV causes a warning message for "poe", but
-		 * is needed for "poerestart". Presently we have no means to
-		 * determine what command a user will execute. We could
-		 * possibly add a "srestart" command which would set
-		 * MP_POERESTART_ENV, but that presently seems unnecessary. */
-		/* setenvf(&env->env, "MP_POERESTART_ENV", res_env); */
-		if (debug_env)
-			debug_num = atoi(debug_env);
-		snprintf(res_env, sizeof(res_env), "SLURM_LL_API_DEBUG=%d",
-			debug_num);
-
-		/* Required for AIX/POE systems indicating pre-allocation */
-		setenvf(&env->env, "LOADLBATCH", "yes");
-		setenvf(&env->env, "LOADL_ACTIVE", "3.2.0");
-	}
-
 	if (env->pty_port
 	&&  setenvf(&env->env, "SLURM_PTY_PORT", "%hu", env->pty_port)) {
 		error("Can't set SLURM_PTY_PORT env variable");
@@ -978,7 +954,6 @@ extern char *uint32_compressed_to_str(uint32_t array_len,
  *	SLURM_JOB_NODELIST
  *	SLURM_JOB_CPUS_PER_NODE
  *	SLURM_NODE_ALIASES
- *	LOADLBATCH (AIX only)
  *	SLURM_BG_NUM_NODES, MPIRUN_PARTITION, MPIRUN_NOFREE, and
  *	MPIRUN_NOALLOCATE (BG only)
  *
@@ -1146,7 +1121,6 @@ env_array_for_job(char ***dest, const resource_allocation_response_msg_t *alloc,
  *	SLURM_NODE_ALIASES
  *	ENVIRONMENT=BATCH
  *	HOSTNAME
- *	LOADLBATCH (AIX only)
  *
  * Sets OBSOLETE variables (needed for MPI, do not remove):
  *	SLURM_JOBID
diff --git a/src/common/working_cluster.c b/src/common/working_cluster.c
index 0a9e631156e..20514c0c17e 100644
--- a/src/common/working_cluster.c
+++ b/src/common/working_cluster.c
@@ -129,9 +129,6 @@ extern uint32_t slurmdb_setup_cluster_flags(void)
 
 static uint32_t _str_2_cluster_flags(char *flags_in)
 {
-	if (xstrcasestr(flags_in, "AIX"))
-		return CLUSTER_FLAG_AIX;
-
 	if (xstrcasestr(flags_in, "BGQ"))
 		return CLUSTER_FLAG_BGQ;
 
@@ -176,12 +173,6 @@ extern char *slurmdb_cluster_flags_2_str(uint32_t flags_in)
 {
 	char *cluster_flags = NULL;
 
-	if (flags_in & CLUSTER_FLAG_AIX) {
-		if (cluster_flags)
-			xstrcat(cluster_flags, ",");
-		xstrcat(cluster_flags, "AIX");
-	}
-
 	if (flags_in & CLUSTER_FLAG_BG) {
 		if (cluster_flags)
 			xstrcat(cluster_flags, ",");
-- 
GitLab