Commit e80f1b4f authored by Sergio Costas's avatar Sergio Costas

Now takes into account only pointers and CRUST variables when comparing thread states

parent a1ec972a
......@@ -1459,27 +1459,28 @@ class crust(object):
TRUE if the status has been already checked; FALSE if not
"""
current_vars = status["variables"]
if not ex_point in status_list:
copyvars = []
for element in current_vars:
vargroup = {}
for varname in element:
# First, copy all the variables, removing every not pointer
current_vars = []
for element in status["variables"]:
vargroup = {}
for varname in element:
if (element[varname]["crust"]) or (element[varname]["pointer"] > 0):
# only copy pointers and CRUST type variables
vargroup[varname] = element[varname].copy()
copyvars.append(vargroup)
status_list[ex_point] = [ copyvars ]
current_vars.append(vargroup)
if not ex_point in status_list:
# if there are no status stored for this point, create a new group
status_list[ex_point] = [ current_vars ]
return False
for old_expoint in status_list[ex_point]:
if old_expoint == current_vars:
# if there is an status identical to the current, return True
return True
copyvars = []
for element in current_vars:
vargroup = {}
for varname in element:
vargroup[varname] = element[varname].copy()
copyvars.append(vargroup)
status_list[ex_point].append(copyvars)
# there is no status identical to the current, so add the current to the list
status_list[ex_point].append(current_vars)
return False
......
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