Index: benchmark/rmit.py
===================================================================
--- benchmark/rmit.py	(revision ffc1689d576bfd29a1d8255084a18e6054d4c23c)
+++ benchmark/rmit.py	(revision f56101f1a10d47718fe1bda947aa0608f6d95ec2)
@@ -63,36 +63,90 @@
 	return eval(fmt)
 
+# Evaluate all the options
+# options can be of the for key = val or key = some_math(other_key)
+# produce a list of all the options to replace some_math(other_key) with actual value
 def eval_options(opts):
+	# Find all the options with dependencies
 	dependents = [d for d in opts.values() if type(d) is DependentOpt]
+
+	# we need to find all the straglers
 	processed = []
-	nopts = []
+
+	# extract all the necessary inputs
+	input_keys = {}
 	for d in dependents:
+		# Mark the dependent as seen
 		processed.append(d.key)
-		lists = []
+
+		# process each of the dependencies
 		for dvar in d.vars:
+			# Check that it depends on something that exists
 			if not dvar in opts.keys():
 				print('ERROR: extra pattern option {}:{} uses unknown key {}'.format(d.key,d.value,dvar), file=sys.stderr)
 				sys.exit(1)
 
-			lists.append([(dvar, o) for o in opts[dvar]])
+			# Check that it's not nested
+			if type(dvar) is DependentOpt:
+				print('ERROR: dependent options cannot be nested {}:{} uses key {}'.format(d.key,d.value,dvar), file=sys.stderr)
+				sys.exit(1)
+
+			# Add the values to the input keys
+			if dvar not in input_keys:
+				input_keys[dvar] = opts[dvar]
+			else :
+				if input_keys[dvar] != opts[dvar]:
+					print('INTERNAL ERROR: repeat input do not match {}:{} vs {}'.format(dvar,opts[dvar],input_keys[dvar]), file=sys.stderr)
+					sys.exit(1)
+
+			# Mark the input as seen
 			processed.append(dvar)
 
-		kopt = []
-		for vals in list(itertools.product(*lists)):
-			res = ['-{}'.format(d.key), "{}".format(eval_one(d.value, vals))]
-			for k, v in vals:
-				res.extend(['-{}'.format(k), "{}".format(v)])
-			kopt.append(res)
-		nopts.append(kopt)
-
-
-	for k, vals in opts.items():
-		if k not in processed:
-			kopt = []
-			for v in vals:
-				kopt.append(['-{}'.format(k), "{}".format(v)])
-			nopts.append(kopt)
-
-	return nopts
+	# add in all the straglers they should cause too many problems
+	for k, v in opts.items():
+		if type(v) is DependentOpt:
+			continue
+
+		if k in processed:
+			# consistency check
+			if k not in input_keys:
+				print('INTERNAL ERROR: key \'{}\' marked as processed but not in input_keys'.format(k), file=sys.stderr)
+				sys.exit(1)
+			continue
+
+		# consistency check
+		if k in input_keys:
+			print('INTERNAL ERROR: key \'{}\' in input_keys but not marked as processed'.format(k), file=sys.stderr)
+			sys.exit(1)
+
+		# add the straggler
+		input_keys[k] = v
+
+	# flatten the dict into a list of pairs so it's easier to work with
+	input_list = []
+	for k, v in input_keys.items():
+		input_list.append([(k, o) for o in v])
+
+	# evaluate all the dependents
+	# they are not allowed to produce new values so it's a one-to-one mapping from here
+	evaluated = []
+	for inputs in list(itertools.product(*input_list)):
+		this_eval = list(inputs)
+		for d in dependents:
+			this_eval.append((d.key, eval_one(d.value, inputs)))
+
+		evaluated.append(this_eval)
+
+	# reformat everything to a list of arguments
+	formated = []
+	for o in evaluated:
+		inner = []
+		for k,v in o:
+			inner.append("-{}".format(k))
+			inner.append("{}".format(v))
+
+		# print(inner)
+		formated.append(inner)
+
+	return formated
 
 # returns the first option with key 'opt'
@@ -122,9 +176,9 @@
 	known_hosts = {
 		"jax": {
-			range(  1,  24) : "48-71",
-			range( 25,  48) : "48-71,144-167",
-			range( 49,  96) : "48-95,144-191",
-			range( 97, 144) : "24-95,120-191",
-			range(145, 192) : "0-95,96-191",
+			range(  1,  25) : "48-71",
+			range( 25,  49) : "48-71,144-167",
+			range( 49,  97) : "48-95,144-191",
+			range( 97, 145) : "24-95,120-191",
+			range(145, 193) : "0-95,96-191",
 		},
 	}
@@ -184,6 +238,4 @@
 
 	except:
-		print('ERROR: invalid arguments', file=sys.stderr)
-		parser.print_help(sys.stderr)
 		sys.exit(1)
 
@@ -215,5 +267,5 @@
 	# Figure out all the combinations to run
 	actions = []
-	for p in itertools.product(range(options.trials), commands, *opts):
+	for p in itertools.product(range(options.trials), commands, opts):
 		act = [p[1]]
 		for o in p[2:]:
@@ -281,3 +333,3 @@
 
 	if options.file != sys.stdout:
-		print("Done");                                                                                ")
+		print("Done                                                                                ")
