10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-21 20:03:33 +01:00

Fixed codelet bug

This commit is contained in:
Anthony Scemama 2020-12-02 10:22:39 +01:00
parent bccb9adbe6
commit f1c8d20fa8
2 changed files with 10 additions and 10 deletions

View File

@ -236,10 +236,10 @@ def get_parsed_text():
append( (l,line) )
return result
#main_result = []
#for filename,text in preprocessed_text:
# main_result.append( (filename, func(filename,text)) )
#return main_result
# Remove duplicates
global preprocessed_text
d = dict(preprocessed_text)
preprocessed_text = [ (k,d[k]) for k in d.keys() ]
return parallel_loop(func,preprocessed_text)
update_variables()
@ -424,11 +424,11 @@ def move_variables():
error.fail(line,"Unable to parse file")
return result
main_result = []
for filename,text in parsed_text:
main_result.append( (filename, func(filename,text)) )
return main_result
#return parallel_loop(func,parsed_text)
# main_result = []
# for filename,text in parsed_text:
# main_result.append( (filename, func(filename,text)) )
# return main_result
return parallel_loop(func,parsed_text)
parsed_text = move_variables()

View File

@ -166,7 +166,7 @@ def parallel_loop(f,source):
result = []
for filename, text in src[thread_id]:
result.append( (filename, f(filename,text)) )
result.sort()
result = sorted(result, key=lambda x: x[0])
if fork == 0:
pickle.dump(result,w,-1)