Skip to content

Commit 5352bff

Browse files
committed
Address Jade's feedback, adjust a log output
Signed-off-by: Engin Kayraklioglu <[email protected]>
1 parent b3d7f4e commit 5352bff

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

util/test/chpl_launchcmd.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def _launch_qsub(self, testing_dir, output_file, error_file):
508508
os.environ["LMOD_QUIET"] = "1"
509509

510510
logging.info(
511-
'Starting {0} job "{1}" on {2} nodes with walltime {3} '
511+
'Starting {0} job "{1}" on {2} locales with walltime {3} '
512512
'and output file: {4}'.format(
513513
self.submit_bin, self.job_name, self.num_locales,
514514
self.walltime, output_file))
@@ -920,19 +920,19 @@ def _qsub_command(self, output_file, error_file):
920920
# When comm=none sub_test/start_test passes -nl -1 (i.e. num locales
921921
# is -1). For the tests to work, reserve one node and the regular
922922
# ncpus (this does not happen by default).
923-
num_locales = self.num_locales
924-
if num_locales == -1:
925-
num_locales = 1
923+
num_nodes = self.num_locales
924+
if num_nodes == -1:
925+
num_nodes = 1
926926

927927
loc_per_node = int(os.environ.get('CHPL_RT_LOCALES_PER_NODE', '1'))
928928

929929
logging.debug("Locales per node: {}".format(loc_per_node))
930-
if num_locales%loc_per_node != 0:
930+
if num_nodes%loc_per_node != 0:
931931
raise RuntimeError('Requested number of locales ({}) is not '
932932
'divisible by CHPL_RT_LOCALES_PER_NODE '
933-
'({}).'.format(num_locales, loc_per_node))
933+
'({}).'.format(num_nodes, loc_per_node))
934934

935-
num_locales = int(num_locales/loc_per_node)
935+
num_nodes = int(num_nodes/loc_per_node)
936936

937937
if self.hostlist is not None:
938938
if loc_per_node != 1:
@@ -946,9 +946,9 @@ def _qsub_command(self, output_file, error_file):
946946

947947
# This relies on the caller to use the correct select syntax.
948948
select_stmt = select_pattern.format(self.hostlist)
949-
select_stmt = select_stmt.replace('<num_locales>', str(num_locales))
950-
elif num_locales > 0:
951-
select_stmt = select_pattern.format(num_locales)
949+
select_stmt = select_stmt.replace('<num_nodes>', str(num_nodes))
950+
elif num_nodes > 0:
951+
select_stmt = select_pattern.format(num_nodes)
952952

953953
if self.num_cpus_resource is not None:
954954
select_stmt += ':{0}={1}'.format(

0 commit comments

Comments
 (0)