Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a9b78fd
Add pdc_logger.h to installation (#245)
TheAssembler1 Apr 8, 2025
abaf753
sync with gitlab (#248)
jeanbez Apr 8, 2025
e08d826
Fix restart issue (#228)
houjun Apr 15, 2025
a93223d
Fix return metadata dtype (#246)
houjun Apr 17, 2025
3bcd2d2
Region info transfer struct type and helper functions (#247)
TheAssembler1 Apr 21, 2025
34ab14f
Fix issues with PDC tools (#249)
houjun Apr 21, 2025
9026ed3
Fix printing in `PGOTO_ERROR` and `PGOTO_ERROR_VOID` (#250)
TheAssembler1 Apr 21, 2025
1653e4f
Group Tests Into Folders (#252)
TheAssembler1 May 12, 2025
90563dd
Return the same obj_id if the obj is just created or already opened (…
houjun May 13, 2025
c42b749
add option to choose interface (#255)
jeanbez May 15, 2025
91914b4
Fix multithreading compilation (#259)
TheAssembler1 May 20, 2025
54383bf
Fix segmentation fault of calling `PDCobj_create_mpi` twice with dupl…
TheAssembler1 May 20, 2025
ebac866
Use `PDC_malloc`, `PDC_free`, `PDC_calloc`, and `PDC_realloc` (#260)
TheAssembler1 May 22, 2025
c6b3ade
Fix Sphinx documentation errors and warnings (#265)
TheAssembler1 May 27, 2025
1106828
Replace `docs/README.md` -> steps to build docs (#268)
TheAssembler1 May 27, 2025
3549007
Use `FUNC_ENTER` and `FUNC_LEAVE` (#270)
TheAssembler1 Jun 3, 2025
5a5714a
New test macros and code cleanup (#261)
TheAssembler1 Jun 11, 2025
d1ef4fb
Tests logging typo fix (#273)
TheAssembler1 Jun 24, 2025
8deaa79
Rename pdc_server.exe to pdc_server for consistency (#275)
TheAssembler1 Jul 2, 2025
2c20971
Update vpicio_mts.c (#276)
TheAssembler1 Jul 2, 2025
7c118b2
Client Propogate `HG_Finalize` error on `PDCclose` (#263)
TheAssembler1 Jul 15, 2025
7a42e85
Standardize ID Lookup Null Checks and Error Handling (#281)
TheAssembler1 Jul 17, 2025
99f612d
Obj open fix (#279)
TheAssembler1 Jul 17, 2025
aabd25a
Fix multithread (#274)
TheAssembler1 Jul 19, 2025
797833d
Fix seg fault when mercury initialization fails (#283)
TheAssembler1 Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/dependencies-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

set -eu -o pipefail

export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=FALSE

brew install open-mpi automake
brew install open-mpi automake m4 libtool

# libfabric
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.15.2.tar.gz
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/gitlab-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitLab

on:
push:
branches:
- develop

jobs:
sync-with-gitlab:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup git
run: |
git config --global user.name "PDC BOT"
git config --global user.email "pdc@example.com"

- name: Update branch
run: |
git fetch origin develop
git remote add gitlab https://${{ secrets.GITLAB_TOKEN_NAME }}:${{ secrets.GITLAB_TOKEN }}@${{ secrets.GITLAB_URL }}
git checkout develop
git push -f gitlab -u develop
28 changes: 28 additions & 0 deletions .github/workflows/gitlab-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitLab

on:
push:
branches:
- stable

jobs:
sync-with-gitlab:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup git
run: |
git config --global user.name "PDC BOT"
git config --global user.email "pdc@example.com"

- name: Update branch
run: |
git fetch stable
git remote add gitlab https://${{ secrets.GITLAB_TOKEN_NAME }}:${{ secrets.GITLAB_TOKEN }}@${{ secrets.GITLAB_URL }}
git checkout stable
git push -f gitlab -u stable
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
sudo sh -c 'echo "`ipconfig getifaddr en0` PDC" >> /etc/hosts'
sudo scutil --set HostName PDC
export HG_TRANSPORT="sockets"
ctest -L serial
ctest -L serial --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Test PDC
working-directory: build
run: ctest -L serial
run: ctest -L serial --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-no-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Test PDC
working-directory: build
run: ctest -L serial
run: ctest -L serial --output-on-failure
3 changes: 2 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ PDC object APIs
* pdc: PDC class ID, returned from PDCInit
* Output:
* Local object ID
* Open a PDC ID created previously by name.
* Open a PDC ID created previously by name, if an object is just created or already opened,
return the same obj_id. Each open requires a close.
* For developers: see pdc_obj.c. Need to communicate with servers for metadata of the object.

* perr_t PDCobj_close(pdcid_t obj_id)
Expand Down
59 changes: 19 additions & 40 deletions src/api/pdc_client_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "pdc_transforms_common.h"
#include "pdc_client_connect.h"
#include "pdc_logger.h"
#include "pdc_malloc.h"

#include "mercury.h"
#include "mercury_macros.h"
Expand Down Expand Up @@ -1354,7 +1355,7 @@ PDC_Client_mercury_init(hg_class_t **hg_class, hg_context_t **hg_context, int po
{
perr_t ret_value = SUCCEED;
char na_info_string[NA_STRING_INFO_LEN];
char hostname[HOSTNAME_LEN];
char * hostname;
int local_server_id;
/* Set the default mercury transport
* but enable overriding that to any of:
Expand All @@ -1378,14 +1379,19 @@ PDC_Client_mercury_init(hg_class_t **hg_class, hg_context_t **hg_context, int po
if ((hg_transport = getenv("HG_TRANSPORT")) == NULL) {
hg_transport = default_hg_transport;
}
memset(hostname, 0, sizeof(hostname));
gethostname(hostname, sizeof(hostname));
if ((hostname = getenv("HG_HOST")) == NULL) {
hostname = PDC_malloc(HOSTNAME_LEN);
memset(hostname, 0, HOSTNAME_LEN);
gethostname(hostname, HOSTNAME_LEN - 1);
}
sprintf(na_info_string, "%s://%s:%d", hg_transport, hostname, port);
if (pdc_client_mpi_rank_g == 0) {
LOG_INFO("==PDC_CLIENT: using %.7s\n", na_info_string);
LOG_INFO("==PDC_CLIENT: using %s\n", na_info_string);
fflush(stdout);
}

free(hostname);

// gni starts here
#ifdef PDC_HAS_CRAY_DRC
/* Acquire credential */
Expand Down Expand Up @@ -3047,30 +3053,10 @@ pack_region_metadata(int ndim, uint64_t *offset, uint64_t *size, region_info_tra

FUNC_ENTER(NULL);
transfer->ndim = ndim;
if (ndim >= 1) {
transfer->start_0 = offset[0];
transfer->count_0 = size[0];
}
else {
transfer->start_0 = 0;
transfer->count_0 = 0;
}
if (ndim >= 2) {
transfer->count_1 = size[1];
transfer->start_1 = offset[1];
}
else {
transfer->start_1 = 0;
transfer->count_1 = 0;
}
if (ndim >= 3) {
transfer->count_2 = size[2];
transfer->start_2 = offset[2];
}
else {
transfer->start_2 = 0;
transfer->count_2 = 0;
}

PDC_copy_region_desc(offset, transfer->start, ndim, ndim);
PDC_copy_region_desc(size, transfer->count, ndim, ndim);

fflush(stdout);
FUNC_LEAVE(ret_value);
}
Expand Down Expand Up @@ -3521,16 +3507,9 @@ PDC_Client_transfer_request(void *buf, pdcid_t obj_id, uint32_t data_server_id,
in.access_type = access_type;
in.remote_unit = unit;
in.obj_id = obj_id;
in.obj_ndim = obj_ndim;
if (in.obj_ndim >= 1) {
in.obj_dim0 = obj_dims[0];
}
if (in.obj_ndim >= 2) {
in.obj_dim1 = obj_dims[1];
}
if (in.obj_ndim >= 3) {
in.obj_dim2 = obj_dims[2];
}

in.obj_ndim = obj_ndim;
PDC_copy_region_desc(obj_dims, in.obj_dims, in.obj_ndim, in.obj_ndim);

// Compute metadata server id
meta_server_id = PDC_get_server_by_obj_id(obj_id, pdc_server_num_g);
Expand Down Expand Up @@ -6586,8 +6565,8 @@ PDC_Client_read_with_storage_meta(int nobj, region_storage_meta_t **all_storage_
prev_fname = fname;

// TODO: currently assumes 1d data and 1 storage region per object
storage_start = all_storage_meta[i]->region_transfer.start_0;
storage_count = all_storage_meta[i]->region_transfer.count_0;
storage_start = all_storage_meta[i]->region_transfer.start[0];
storage_count = all_storage_meta[i]->region_transfer.count[0];
req_start = storage_start;
req_count = storage_count;
file_offset = all_storage_meta[i]->offset;
Expand Down
2 changes: 1 addition & 1 deletion src/api/pdc_obj/include/pdc_mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* returned by PDCprop_create(PDC_OBJ_CREATE)
* \param rank_id [IN] MPI process rank
*
* \return Object ID on success/Negative on failure
* \return Object ID on success/Zero on failure
*/
pdcid_t PDCobj_create_mpi(pdcid_t cont_id, const char *obj_name, pdcid_t obj_create_prop, int rank_id,
MPI_Comm comm);
Expand Down
15 changes: 11 additions & 4 deletions src/api/pdc_obj/pdc_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
pdcid_t
PDCobj_create_mpi(pdcid_t cont_id, const char *obj_name, pdcid_t obj_prop_id, int rank_id, MPI_Comm comm)
{
pdcid_t ret_value = SUCCEED;
struct _pdc_obj_info *p = NULL;
struct _pdc_id_info * id_info = NULL;
struct _pdc_obj_info *p = NULL;
struct _pdc_id_info * id_info = NULL;
int rank;
pdcid_t ret_value;

FUNC_ENTER(NULL);

Expand All @@ -46,14 +46,21 @@ PDCobj_create_mpi(pdcid_t cont_id, const char *obj_name, pdcid_t obj_prop_id, in
else
ret_value = PDC_obj_create(cont_id, obj_name, obj_prop_id, PDC_OBJ_LOCAL);

if (ret_value == 0)
PGOTO_ERROR(ret_value, "PDC_obj_create failed");

id_info = PDC_find_id(ret_value);
p = (struct _pdc_obj_info *)(id_info->obj_ptr);
if (id_info == NULL)
PGOTO_ERROR(0, "PDC_find_id failed for object id: %d", ret_value);

p = (struct _pdc_obj_info *)(id_info->obj_ptr);

MPI_Bcast(&(p->obj_info_pub->meta_id), 1, MPI_LONG_LONG, rank_id, comm);
MPI_Bcast(&(p->obj_info_pub->metadata_server_id), 1, MPI_UINT32_T, rank_id, comm);
MPI_Bcast(&(((pdc_metadata_t *)p->metadata)->data_server_id), 1, MPI_UINT32_T, rank_id, comm);
MPI_Bcast(&(((pdc_metadata_t *)p->metadata)->region_partition), 1, MPI_UINT8_T, rank_id, comm);

done:
FUNC_LEAVE(ret_value);
}

Expand Down
20 changes: 20 additions & 0 deletions src/api/pdc_obj/pdc_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,29 @@ PDCobj_open_common(const char *obj_name, pdcid_t pdc, int is_col)
pdcid_t obj_prop;
size_t i;
uint32_t metadata_server_id;
obj_handle * oh;
struct pdc_obj_info * info;
int is_opened = 0;

FUNC_ENTER(NULL);

// Search if the object has already been opened
oh = PDCobj_iter_start(pdc);
while (!PDCobj_iter_null(oh)) {
info = PDCobj_iter_get_info(oh);
if (strcmp(obj_name, info->name) == 0) {
is_opened = 1;
break;
}
oh = PDCobj_iter_next(oh, pdc);
}

if (is_opened) {
ret_value = info->local_id;
PDC_inc_ref(info->local_id);
goto done;
}

p = (struct _pdc_obj_info *)PDC_malloc(sizeof(struct _pdc_obj_info));
if (!p)
PGOTO_ERROR(0, "PDC object memory allocation failed");
Expand Down
Loading
Loading