Commit 7a5493de authored by root's avatar root

Added nodelist for exclusive jobs with node number greater than 1.

Note: The determination of exclusive jobs from ml or romeo only works if the number of cores is based on the physical cores.
parent 444198ba
......@@ -4,6 +4,7 @@ from __future__ import print_function
import argparse
import os
import hostlist
#import mysql.connector as mariadb
import pymysql as mariadb
......@@ -17,7 +18,9 @@ def getPartitionCoreNumber(partition):
if 'smp1' in partition: return 32
if 'smp2' in partition: return 64
if 'knl' in partition: return 64
if 'ml' in partition: return 176
if 'hpdlf' in partition: return 12
if 'ml' in partition: return 44
if 'romeo' in partition: return 256
else: return 0
def getStatus(state):
......@@ -155,6 +158,10 @@ def update_prope(mariadb_connection, slurm_data):
sql_cmd += "P_PARTITION=\"" + str(slurm_data['P_PARTITION']) + "\","
if exclusive == 0:
sql_cmd += "EXCLUSIVE="+ str(slurm_data['EXCLUSIVE']) + ","
if slurm_data['EXCLUSIVE'] == 1 and slurm_data['NUM_NODES'] > 1:
nodelist = hostlist.expand_hostlist(slurm_data['NODELIST'])
nodelist_s = ' '.join(map(str, nodelist))
sql_cmd += "CPULIST=\""+ str(nodelist_s) + "\","
sql_cmd += "ARRAY_ID=" + str(slurm_data['ARRAY_ID']) + str(sql_filter)
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment