Index: /issm/trunk-jpl/src/m/solve/waitonlock.m
===================================================================
--- /issm/trunk-jpl/src/m/solve/waitonlock.m	(revision 27682)
+++ /issm/trunk-jpl/src/m/solve/waitonlock.m	(revision 27683)
@@ -51,7 +51,6 @@
 			command = [command ' -i ' cluster.idfile];
 		end
-		port=0;
 		if isprop(cluster,'port') && cluster.port,
-			command = [command ' -p ' num2str(port) ' localhost'];
+			command = [command ' -p ' num2str(cluster.port) ' localhost'];
 		else,
 			command = [command ' ' cluster.name];
Index: /issm/trunk-jpl/src/m/solve/waitonlock.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/waitonlock.py	(revision 27682)
+++ /issm/trunk-jpl/src/m/solve/waitonlock.py	(revision 27683)
@@ -60,7 +60,6 @@
             if isprop(cluster, 'idfile') and cluster.idfile != '':
                 command += ' -i {}'.format(cluster.idfile)
-            port = 0
             if isprop(cluster, 'port') and cluster.port:
-                command += ' -p {} localhost'.format(port);
+                command += ' -p {} localhost'.format(cluster.port);
             else:
                 command += ' {}'.format(cluster.name)
