Draft: Add client-side region cache - #314
Draft
hyunjuooh wants to merge 5 commits into
Draft
Conversation
| int rank_limit = 5; | ||
| double end_time; | ||
| time_t cur_time = time(NULL); | ||
| struct tm *log_time = localtime(&cur_time); |
| end_time = MPI_Wtime(); | ||
| if (pdc_client_mpi_rank_g < rank_limit) { | ||
| cur_time = time(NULL); | ||
| log_time = localtime(&cur_time); |
| temp_inter_recv_buf = (char *)PDC_malloc(max_inter_recv_chunk * INTER_TRANSFER_UNIT_SIZE + 1); | ||
|
|
||
| printf("[RANK %d] global_max_chunk_size: %d, max_intra_recv_chunk: %d, max_inter_recv_chunk: %d\n", | ||
| client_info.world_rank, global_max_chunk_size, max_intra_recv_chunk, max_inter_recv_chunk); |
| temp_inter_recv_buf = (char *)PDC_malloc(max_inter_recv_chunk * INTER_TRANSFER_UNIT_SIZE + 1); | ||
|
|
||
| printf("[RANK %d] global_max_chunk_size: %d, max_intra_recv_chunk: %d, max_inter_recv_chunk: %d\n", | ||
| client_info.world_rank, global_max_chunk_size, max_intra_recv_chunk, max_inter_recv_chunk); |
| temp_inter_recv_buf = (char *)PDC_malloc(max_inter_recv_chunk * INTER_TRANSFER_UNIT_SIZE + 1); | ||
|
|
||
| printf("[RANK %d] global_max_chunk_size: %d, max_intra_recv_chunk: %d, max_inter_recv_chunk: %d\n", | ||
| client_info.world_rank, global_max_chunk_size, max_intra_recv_chunk, max_inter_recv_chunk); |
| // MPI_Allgather(&obj_prefetch_list_len, 1, MPI_INT, global_list_len, 1, MPI_INT, MPI_COMM_WORLD); | ||
|
|
||
| global_obj_prefetch_list = | ||
| (pdcid_t *)PDC_malloc(obj_prefetch_list_len * pdc_client_mpi_size_g * sizeof(pdcid_t)); |
| obj_prefetch_list_len, MPI_UINT64_T, MPI_COMM_WORLD); | ||
|
|
||
| if (reg_offset_list != NULL) { | ||
| global_offset_list = (uint64_t *)PDC_malloc(reg_dim * pdc_client_mpi_size_g * sizeof(uint64_t)); |
|
|
||
| if (reg_offset_list != NULL) { | ||
| global_offset_list = (uint64_t *)PDC_malloc(reg_dim * pdc_client_mpi_size_g * sizeof(uint64_t)); | ||
| global_size_list = (uint64_t *)PDC_malloc(reg_dim * pdc_client_mpi_size_g * sizeof(uint64_t)); |
| perr_t ret_value = SUCCEED; | ||
|
|
||
| uint64_t read_size = 0; | ||
| int by_size; |
| PDCregion_print_prefetch_list() | ||
| { | ||
| perr_t ret_value = SUCCEED; | ||
| int i; |
hyunjuooh
marked this pull request as draft
September 3, 2026 16:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a client-side region cache for the PDC client API. Regions read from the server are cached locally so repeated reads of the same region are served from the client. Includes an optional prefetch path for retrieving regions ahead of use. The feature is gated behind the
PDC_CLIENT_CACHECMake option (off by default).What changes are proposed in this pull request?
Checklist: