mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13:33 +01:00
Fixed codelet bug
This commit is contained in:
parent
bccb9adbe6
commit
f1c8d20fa8
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user