Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A
abt-io
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • sds
  • abt-io
  • Issues
  • #4

Closed
Open
Opened Nov 02, 2020 by Matthieu Dorier@mdorier
  • Report abuse
Report abuse

Refactoring with JSON and new Margo

This issue lists the things that need to be refactored once margo 0.9 is released.

  • abt_io_init_json should be removed
  • abt_io_init_pool should be marked as deprecated (with a gcc attribute)
  • dependency to margo-cfg should be removed, to use json-c instead
  • a new abt_io_init_ext function should be added, along with an abt_io_init_info structure

The abt_io_init_ext function should have the following prototype:

abt_io_instance_id abt_io_init_ext(const struct abt_io_init_info* args);

with abt_io_init_info defined as follows:

struct abt_io_init_info {
    const char* json_config;
    ABT_pool    pool;
};

The JSON configuration should be of the following format:

{ "thread_count" : <int> }

Note the absence of a "abtio" : key; this is because in Bedrock we may want to list multiple abt-io instances in an array, and having the "abtio" : key before the configuration will make the JSON more complicated.

The "thread_count" field, if not provided, defaults to 0. If the caller provides a non-null pool and a non-zero thread_count (either using abt_io_init or abt_io_init_ext with a non-zero "thread_count" field in the JSON configuration), ABT-IO should create as many ES as requested and have them use the provided pool (effectively, if the pool is also used by other ES outside of ABT-IO, these ES will be used by ABT-IO indirectly).

Warning: when testing if pool is null, remember to use (pool == ABT_POOL_NULL || pool == NULL) since ABT_POOL_NULL is not equal to NULL, yet the user may have done struct abt_io_init_info args = { 0 }.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: sds/abt-io#4