Bedrock module for Bake
This issue lists the modifications to be done to create a Bedrock module for Bake.
- Follow the example here and the header here to implement a bake-bedrock.c file compiled into a libbake-bedrock.so library;
Add the proper
--enable-bedrockoption in configure to look for the Bedrock header. There is no need to link libbake-bedrock.so with libbedrock-server.so, however it should be linked against libbake-server.so and libbake-client.so.
+bedrockoption in Bake's spack package (I suggest turning it on by default) to enable building the Bedrock module.
An ABT-IO instance is created in the file backend (here). This instance should actually be owned by the provider, not the backend, and there should be a server-side function to set it, e.g.
int bake_provider_set_abt_io(bake_provider_t p, abt_io_instance_id abtioid). The Bedrock module should look get the optional ABT-IO instance out of the resolved dependencies and set it after registering the provider.
Currently the Bake provider also instantiates a REMI client (here), and a REMI provider (here). These dependencies should be injected into the provider via an API rather than instantiated by the provider, i.e., there should be a function
bake_provider_set_remi(...)in the bake server library, that takes a bake provider, a REMI provider and REMI client. (Matthieu can take care of that once the rest is done).
We should be able to provide a JSON configuration when initializing the Bake provider. This can be done either by changing the signature of the
bake_provider_registerfunction (passing a structure like in Margo, containing the JSON string, the pool, and optional dependencies such as the ABT-IO instance and REMI client and provider. The JSON configuration should contain provider-specific configurations, as well as a "targets" array listing targets we want to open or create.
- We also need a bake provider to have a function to get a JSON object out such that passing this JSON object as config back to back will set Bake into exactly the same state as the one that generated the config (i.e. exact same parameters, exact same targets open, etc.).
- Margo now provides logging facility and Bedrock dependency-injects a logger in it, so if Bake were to use Margo's logging functions, its logs would integrate nicely with Bedrock's and Margo's. (see here.
- It would be nice to have the admin library discussed here as well.
- Something (either the module register or internal provider register) needs to auto create and/or auto attach targets that are specified ahead of time in the json
- Update C++ bindings (after other changes)