optimas-org / optimas

Optimization at scale, powered by libEnsemble
https://optimas.readthedocs.io
Other
22 stars 13 forks source link

Run generator on manager #198

Closed AngelFP closed 4 months ago

AngelFP commented 4 months ago

This PR uses the new "gen_on_manager" option from libEnsemble, allowing the generator to run in the same process as the manager. This avoids passing the generator to the worker as a copy, so that the generator that gen_f uses is the same instance that was created by the user. This simplifies the code (no need to update the gen in a dirty way after the exploration run) and avoids potentially unexpected behavior that could result from operating on copies of the generator.

Additionally, a new test has been added to check that GPU resource allocation works properly.