Skip to content

Draft: Add client-side region cache - #314

Draft
hyunjuooh wants to merge 5 commits into
hpc-io:developfrom
hyunjuooh:clientcache-develop
Draft

Draft: Add client-side region cache#314
hyunjuooh wants to merge 5 commits into
hpc-io:developfrom
hyunjuooh:clientcache-develop

Conversation

@hyunjuooh

@hyunjuooh hyunjuooh commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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_CACHE CMake option (off by default).

What changes are proposed in this pull request?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected; for instance, examples in this repository must be updated too)
  • This change requires a documentation update

Checklist:

  • My code modifies existing public API, or introduces new public API, and I updated or wrote docstrings
  • I have commented my code
  • My code requires documentation updates, and I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@hyunjuooh
hyunjuooh requested a review from a team as a code owner September 3, 2026 15:41
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
hyunjuooh marked this pull request as draft September 3, 2026 16:02
@hyunjuooh hyunjuooh changed the title Add client-side region cache Draft: Add client-side region cache Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants