Skip to content
Snippets Groups Projects
Commit 26e10191 authored by Pierre-Elouan Rethore's avatar Pierre-Elouan Rethore
Browse files

fixing the recording in parallel for the random_search_driver

parent b36cf9ba
No related branches found
No related tags found
1 merge request!127Electrical cost and Parallel RandomSearch
Pipeline #9921 failed
...@@ -203,6 +203,7 @@ class RandomSearchDriver(Driver): ...@@ -203,6 +203,7 @@ class RandomSearchDriver(Driver):
if one_success: if one_success:
n_iter += 1 n_iter += 1
if disp and comm.rank==0: if disp and comm.rank==0:
obj_value_x0, success = self.objective_callback(x0, record=True)
print('rank:', comm.rank, n_iter, obj_value_x0) print('rank:', comm.rank, n_iter, obj_value_x0)
else: else:
## We only use one CPU ## We only use one CPU
...@@ -227,7 +228,7 @@ class RandomSearchDriver(Driver): ...@@ -227,7 +228,7 @@ class RandomSearchDriver(Driver):
obj_value_x1, success = self.objective_callback(x0, record=True) obj_value_x1, success = self.objective_callback(x0, record=True)
return False return False
def objective_callback(self, x, record=True): def objective_callback(self, x, record=False):
""" """
Evaluate problem objective at the requested point. Evaluate problem objective at the requested point.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment