Skip to content

Commit

Permalink
use ABT after calling margo_init
Browse files Browse the repository at this point in the history
  • Loading branch information
adammoody committed Aug 9, 2021
1 parent ea2f5f5 commit 1e156e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/src/unifyfs_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ int main(int argc, char* argv[])
}

LOGDBG("initializing rpc service");
ABT_init(argc, argv);
ABT_mutex_create(&app_configs_abt_sync);
rc = configurator_bool_val(server_cfg.margo_lazy_connect,
&margo_lazy_connect);
rc = configurator_bool_val(server_cfg.margo_tcp,
Expand All @@ -408,6 +406,11 @@ int main(int argc, char* argv[])
exit(1);
}

/* We wait to call any ABT functions until after margo_init.
* Margo configures ABT in a particular way, so we defer to
* Margo to call ABT_init. */
ABT_mutex_create(&app_configs_abt_sync);

ABT_mutex_lock(app_configs_abt_sync);
failed_clients = arraylist_create(0);
ABT_mutex_unlock(app_configs_abt_sync);
Expand Down

0 comments on commit 1e156e2

Please sign in to comment.