|
2 | 2 | Example of multi-fidelity optimization using a persistent GP gen_func (calling |
3 | 3 | Ax). |
4 | 4 |
|
| 5 | +Test is set to use the gen_on_manager option (persistent generator runs on |
| 6 | +a thread). Therefore nworkers is the number of simulation workers. |
| 7 | +
|
5 | 8 | Execute via one of the following commands (e.g. 5 workers): |
6 | | - mpiexec -np 5 python test_persistent_gp_multitask_ax.py |
7 | | - python test_persistent_gp_multitask_ax.py --nworkers 4 --comms local |
8 | | - python test_persistent_gp_multitask_ax.py --nworkers 4 --comms tcp |
| 9 | + mpiexec -np 4 python test_persistent_gp_multitask_ax.py |
| 10 | + python test_persistent_gp_multitask_ax.py --nworkers 3 --comms local |
| 11 | + python test_persistent_gp_multitask_ax.py --nworkers 3 --comms tcp |
9 | 12 |
|
10 | 13 | When running with the above commands, the number of concurrent evaluations of |
11 | | -the objective function will be 3, as one of the three workers will be the |
12 | | -persistent generator. |
| 14 | +the objective function will be 3. |
13 | 15 |
|
14 | | -Requires numpy<2. |
15 | 16 | """ |
16 | 17 |
|
17 | 18 | # Do not change these lines - they are parsed by run-tests.sh |
18 | 19 | # TESTSUITE_COMMS: local mpi |
19 | | -# TESTSUITE_NPROCS: 5 |
| 20 | +# TESTSUITE_NPROCS: 4 |
20 | 21 | # TESTSUITE_EXTRA: true |
21 | 22 | # TESTSUITE_OS_SKIP: OSX |
22 | 23 | # TESTSUITE_EXCLUDE: true |
@@ -63,6 +64,7 @@ def run_simulation(H, persis_info, sim_specs, libE_info): |
63 | 64 | # Main block is necessary only when using local comms with spawn start method (default on macOS and Windows). |
64 | 65 | if __name__ == "__main__": |
65 | 66 | nworkers, is_manager, libE_specs, _ = parse_args() |
| 67 | + libE_specs["gen_on_manager"] = True |
66 | 68 |
|
67 | 69 | mt_params = { |
68 | 70 | "name_hifi": "expensive_model", |
|
0 commit comments