@@ -1626,13 +1626,11 @@ PDC_Client_finalize()
16261626 LOG_INFO ("T_memcpy: %.2f\n" , memcpy_time_g );
16271627#endif
16281628
1629- hg_ret = HG_Context_destroy (send_context_g );
1630- if (hg_ret != HG_SUCCESS )
1629+ if (HG_Context_destroy (send_context_g ) != HG_SUCCESS )
16311630 PGOTO_ERROR (FAIL , "Error with HG_Context_destroy" );
16321631
1633- hg_ret = HG_Finalize (send_class_g );
1634- if (hg_ret != HG_SUCCESS )
1635- LOG_WARNING ("Error with HG_Finalize\n" );
1632+ if (HG_Finalize (send_class_g ) != HG_SUCCESS )
1633+ PGOTO_ERROR (FAIL , "Error with HG_Finalize" );
16361634
16371635done :
16381636 FUNC_LEAVE (ret_value );
@@ -2974,8 +2972,9 @@ PDC_Client_flush_obj_all()
29742972}
29752973
29762974perr_t
2977- PDC_Client_transfer_request_all (int n_objs , pdc_access_t access_type , uint32_t data_server_id , char * bulk_buf ,
2978- hg_size_t bulk_size , uint64_t * metadata_id ,
2975+ PDC_Client_transfer_request_all (hg_bulk_t * bulk_handle , int n_objs , pdc_access_t access_type ,
2976+ uint32_t data_server_id , char * bulk_buf , hg_size_t bulk_size ,
2977+ uint64_t * metadata_id ,
29792978#ifdef ENABLE_MPI
29802979 MPI_Comm comm )
29812980#else
@@ -3015,8 +3014,9 @@ PDC_Client_transfer_request_all(int n_objs, pdc_access_t access_type, uint32_t d
30153014 transfer_request_all_register_id_g , & client_send_transfer_request_all_handle );
30163015
30173016 // Create bulk handles
3018- hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& bulk_buf , & bulk_size , HG_BULK_READWRITE ,
3017+ hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& bulk_buf , & bulk_size , HG_BULK_READWRITE ,
30193018 & (in .local_bulk_handle ));
3019+ * bulk_handle = in .local_bulk_handle ;
30203020 if (hg_ret != HG_SUCCESS )
30213021 PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
30223022
@@ -3076,8 +3076,8 @@ PDC_Client_transfer_request_all(int n_objs, pdc_access_t access_type, uint32_t d
30763076}
30773077
30783078perr_t
3079- PDC_Client_transfer_request_metadata_query2 (char * buf , uint64_t total_buf_size , uint64_t query_id ,
3080- uint32_t metadata_server_id )
3079+ PDC_Client_transfer_request_metadata_query2 (hg_bulk_t * bulk_handle , char * buf , uint64_t total_buf_size ,
3080+ uint64_t query_id , uint32_t metadata_server_id )
30813081{
30823082 FUNC_ENTER (NULL );
30833083
@@ -3110,6 +3110,7 @@ PDC_Client_transfer_request_metadata_query2(char *buf, uint64_t total_buf_size,
31103110 // For sending metadata
31113111 hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& (in .total_buf_size ), HG_BULK_READWRITE ,
31123112 & (in .local_bulk_handle ));
3113+ * bulk_handle = in .local_bulk_handle ;
31133114 if (hg_ret != HG_SUCCESS )
31143115 PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
31153116
@@ -3137,8 +3138,8 @@ PDC_Client_transfer_request_metadata_query2(char *buf, uint64_t total_buf_size,
31373138}
31383139
31393140perr_t
3140- PDC_Client_transfer_request_metadata_query (char * buf , uint64_t total_buf_size , int n_objs ,
3141- uint32_t metadata_server_id , uint8_t is_write ,
3141+ PDC_Client_transfer_request_metadata_query (hg_bulk_t * bulk_handle , char * buf , uint64_t total_buf_size ,
3142+ int n_objs , uint32_t metadata_server_id , uint8_t is_write ,
31423143 uint64_t * output_buf_size , uint64_t * query_id )
31433144{
31443145 FUNC_ENTER (NULL );
@@ -3174,6 +3175,7 @@ PDC_Client_transfer_request_metadata_query(char *buf, uint64_t total_buf_size, i
31743175 // For sending metadata
31753176 hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& (in .total_buf_size ), HG_BULK_READWRITE ,
31763177 & (in .local_bulk_handle ));
3178+ * bulk_handle = in .local_bulk_handle ;
31773179 if (hg_ret != HG_SUCCESS )
31783180 PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
31793181
@@ -3203,7 +3205,8 @@ PDC_Client_transfer_request_metadata_query(char *buf, uint64_t total_buf_size, i
32033205}
32043206
32053207perr_t
3206- PDC_Client_transfer_request_wait_all (int n_objs , pdcid_t * transfer_request_id , uint32_t data_server_id )
3208+ PDC_Client_transfer_request_wait_all (hg_bulk_t * bulk_handle , int n_objs , pdcid_t * transfer_request_id ,
3209+ uint32_t data_server_id )
32073210{
32083211 FUNC_ENTER (NULL );
32093212
@@ -3238,6 +3241,7 @@ PDC_Client_transfer_request_wait_all(int n_objs, pdcid_t *transfer_request_id, u
32383241 // For sending metadata
32393242 hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& transfer_request_id , (hg_size_t * )& (in .total_buf_size ),
32403243 HG_BULK_READWRITE , & (in .local_bulk_handle ));
3244+ * bulk_handle = in .local_bulk_handle ;
32413245 if (hg_ret != HG_SUCCESS )
32423246 PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
32433247
@@ -3269,8 +3273,8 @@ PDC_Client_transfer_request_wait_all(int n_objs, pdcid_t *transfer_request_id, u
32693273}
32703274
32713275perr_t
3272- PDC_Client_transfer_request (void * buf , pdcid_t obj_id , uint32_t data_server_id , int obj_ndim ,
3273- uint64_t * obj_dims , int remote_ndim , uint64_t * remote_offset ,
3276+ PDC_Client_transfer_request (hg_bulk_t * bulk_handle , void * buf , pdcid_t obj_id , uint32_t data_server_id ,
3277+ int obj_ndim , uint64_t * obj_dims , int remote_ndim , uint64_t * remote_offset ,
32743278 uint64_t * remote_size , size_t unit , pdc_access_t access_type ,
32753279 pdcid_t * metadata_id )
32763280{
@@ -3328,6 +3332,7 @@ PDC_Client_transfer_request(void *buf, pdcid_t obj_id, uint32_t data_server_id,
33283332 // Create bulk handle
33293333 hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& total_data_size , HG_BULK_READWRITE ,
33303334 & (in .local_bulk_handle ));
3335+ * bulk_handle = in .local_bulk_handle ;
33313336
33323337 if (hg_ret != HG_SUCCESS )
33333338 PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
0 commit comments