Skip to content

Commit eabce87

Browse files
author
Francesco Libbi
committed
Prova
1 parent 9ddd062 commit eabce87

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

Modules/Ensemble.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,11 +1894,11 @@ def work_function(argument):
18941894
print("mask length:", np.sum(mask.astype(int))," total N:", len(mask))
18951895
new_ensemble = self.split(mask)
18961896

1897-
gradient, error = new_ensemble.get_preconditioned_gradient(*args, **kwargs)
1897+
gradient, _ = new_ensemble.get_preconditioned_gradient(*args, **kwargs)
18981898

18991899
av_ensemble = np.sum(new_ensemble.rho)
19001900

1901-
return gradient * av_ensemble, error * av_ensemble
1901+
return gradient * av_ensemble
19021902

19031903
nproc = CC.Settings.GetNProc()
19041904
list_of_inputs = []
@@ -1912,14 +1912,10 @@ def work_function(argument):
19121912

19131913
list_of_inputs.append( (start_config, end_config) )
19141914

1915-
results = CC.Settings.GoParallelTuple(work_function, list_of_inputs, "+")
1916-
print(results)
1917-
print(np.shape(results))
1918-
gradient, error = results
1915+
gradient = CC.Settings.GoParallel(work_function, list_of_inputs, "+")
19191916
gradient /= np.sum(self.rho)
1920-
error /= np.sum(self.rho)
19211917

1922-
return gradient, error
1918+
return gradient, np.zeros_like(gradient) + 1
19231919

19241920

19251921

0 commit comments

Comments
 (0)