@@ -1626,13 +1626,11 @@ PDC_Client_finalize()
1626
1626
LOG_INFO ("T_memcpy: %.2f\n" , memcpy_time_g );
1627
1627
#endif
1628
1628
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 )
1631
1630
PGOTO_ERROR (FAIL , "Error with HG_Context_destroy" );
1632
1631
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" );
1636
1634
1637
1635
done :
1638
1636
FUNC_LEAVE (ret_value );
@@ -2974,8 +2972,9 @@ PDC_Client_flush_obj_all()
2974
2972
}
2975
2973
2976
2974
perr_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 ,
2979
2978
#ifdef ENABLE_MPI
2980
2979
MPI_Comm comm )
2981
2980
#else
@@ -3015,8 +3014,9 @@ PDC_Client_transfer_request_all(int n_objs, pdc_access_t access_type, uint32_t d
3015
3014
transfer_request_all_register_id_g , & client_send_transfer_request_all_handle );
3016
3015
3017
3016
// 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 ,
3019
3018
& (in .local_bulk_handle ));
3019
+ * bulk_handle = in .local_bulk_handle ;
3020
3020
if (hg_ret != HG_SUCCESS )
3021
3021
PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
3022
3022
@@ -3076,8 +3076,8 @@ PDC_Client_transfer_request_all(int n_objs, pdc_access_t access_type, uint32_t d
3076
3076
}
3077
3077
3078
3078
perr_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 )
3081
3081
{
3082
3082
FUNC_ENTER (NULL );
3083
3083
@@ -3110,6 +3110,7 @@ PDC_Client_transfer_request_metadata_query2(char *buf, uint64_t total_buf_size,
3110
3110
// For sending metadata
3111
3111
hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& (in .total_buf_size ), HG_BULK_READWRITE ,
3112
3112
& (in .local_bulk_handle ));
3113
+ * bulk_handle = in .local_bulk_handle ;
3113
3114
if (hg_ret != HG_SUCCESS )
3114
3115
PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
3115
3116
@@ -3137,8 +3138,8 @@ PDC_Client_transfer_request_metadata_query2(char *buf, uint64_t total_buf_size,
3137
3138
}
3138
3139
3139
3140
perr_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 ,
3142
3143
uint64_t * output_buf_size , uint64_t * query_id )
3143
3144
{
3144
3145
FUNC_ENTER (NULL );
@@ -3174,6 +3175,7 @@ PDC_Client_transfer_request_metadata_query(char *buf, uint64_t total_buf_size, i
3174
3175
// For sending metadata
3175
3176
hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& (in .total_buf_size ), HG_BULK_READWRITE ,
3176
3177
& (in .local_bulk_handle ));
3178
+ * bulk_handle = in .local_bulk_handle ;
3177
3179
if (hg_ret != HG_SUCCESS )
3178
3180
PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
3179
3181
@@ -3203,7 +3205,8 @@ PDC_Client_transfer_request_metadata_query(char *buf, uint64_t total_buf_size, i
3203
3205
}
3204
3206
3205
3207
perr_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 )
3207
3210
{
3208
3211
FUNC_ENTER (NULL );
3209
3212
@@ -3238,6 +3241,7 @@ PDC_Client_transfer_request_wait_all(int n_objs, pdcid_t *transfer_request_id, u
3238
3241
// For sending metadata
3239
3242
hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& transfer_request_id , (hg_size_t * )& (in .total_buf_size ),
3240
3243
HG_BULK_READWRITE , & (in .local_bulk_handle ));
3244
+ * bulk_handle = in .local_bulk_handle ;
3241
3245
if (hg_ret != HG_SUCCESS )
3242
3246
PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
3243
3247
@@ -3269,8 +3273,8 @@ PDC_Client_transfer_request_wait_all(int n_objs, pdcid_t *transfer_request_id, u
3269
3273
}
3270
3274
3271
3275
perr_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 ,
3274
3278
uint64_t * remote_size , size_t unit , pdc_access_t access_type ,
3275
3279
pdcid_t * metadata_id )
3276
3280
{
@@ -3328,6 +3332,7 @@ PDC_Client_transfer_request(void *buf, pdcid_t obj_id, uint32_t data_server_id,
3328
3332
// Create bulk handle
3329
3333
hg_ret = HG_Bulk_create (hg_class , 1 , (void * * )& buf , (hg_size_t * )& total_data_size , HG_BULK_READWRITE ,
3330
3334
& (in .local_bulk_handle ));
3335
+ * bulk_handle = in .local_bulk_handle ;
3331
3336
3332
3337
if (hg_ret != HG_SUCCESS )
3333
3338
PGOTO_ERROR (FAIL , "Could not create local bulk data handle" );
0 commit comments