int orte_sstore_central_local_register(orte_sstore_base_handle_t handle) { int ret, exit_status = ORTE_SUCCESS; orte_sstore_central_local_snapshot_info_t *handle_info = NULL; OPAL_OUTPUT_VERBOSE((10, mca_sstore_central_component.super.output_handle, "sstore:central:(local): register()")); /* * Create a handle */ if( NULL == (handle_info = find_handle_info(handle)) ) { handle_info = create_new_handle_info(handle); } /* * Get basic information from Global SStore */ if( ORTE_SUCCESS != (ret = pull_handle_info(handle_info)) ) { ORTE_ERROR_LOG(ret); exit_status = ret; goto cleanup; } /* * Wait here until the pull request has been satisfied */ while(SSTORE_LOCAL_READY != handle_info->status && SSTORE_LOCAL_ERROR != handle_info->status ) { opal_progress(); } cleanup: return exit_status; }
int orte_sstore_central_app_register(orte_sstore_base_handle_t handle) { int ret, exit_status = ORTE_SUCCESS; orte_sstore_central_app_snapshot_info_t *handle_info = NULL; OPAL_OUTPUT_VERBOSE((10, mca_sstore_central_component.super.output_handle, "sstore:central:(app): register(%d)", (int)handle)); /* * Create a handle */ orte_sstore_handle_current = handle; handle_info = find_handle_info(handle); if( NULL != handle_info ) { /* Remove the old, stale handle */ opal_list_remove_item(active_handles, &(handle_info->super)); } handle_info = create_new_handle_info(handle); /* * Get basic information from Local SStore */ if( ORTE_SUCCESS != (ret = pull_handle_info(handle_info)) ) { ORTE_ERROR_LOG(ret); exit_status = ret; goto cleanup; } /* * Setup the storage directory */ if( ORTE_SUCCESS != (ret = init_local_snapshot_directory(handle_info)) ) { ORTE_ERROR_LOG(ret); exit_status = ret; goto cleanup; } cleanup: return exit_status; }