Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions .github/workflows/ubuntu-cache-profiling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Ubuntu (profiling)

on:
pull_request:
branches: [ stable, develop ]

push:
branches: [ stable, develop ]

workflow_dispatch:

jobs:
PDC:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v3

- name: Dependencies
run: .github/workflows/dependencies-linux.sh

- name: Build PDC
run: |
mkdir build && cd build
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DPDC_ENABLE_PROFILING=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_POLICY_VERSION_MINIMUM=3.5
make -j2

- name: Test PDC
working-directory: build
run: ctest -L serial --output-on-failure
5 changes: 4 additions & 1 deletion src/api/close_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
int
main(int argc, char *argv[])
{
FUNC_ENTER(NULL);

pdcid_t pdc;
#ifdef ENABLE_MPI
int rank;
Expand All @@ -57,5 +59,6 @@ main(int argc, char *argv[])
}
MPI_Finalize();
#endif
return 0;

FUNC_LEAVE(0);
}
27 changes: 14 additions & 13 deletions src/api/pdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ perr_t PDC_class__close(struct _pdc_class *p);
static perr_t
PDC_class_init()
{
perr_t ret_value = SUCCEED;

FUNC_ENTER(NULL);

perr_t ret_value = SUCCEED;

/* Initialize the atom group for the container property IDs */
if (PDC_register_type(PDC_CLASS, (PDC_free_t)PDC_class__close) < 0)
PGOTO_ERROR(FAIL, "unable to initialize pdc class interface");
Expand All @@ -61,12 +61,12 @@ PDC_class_init()
static pdcid_t
PDC_class_create(const char *pdc_name)
{
FUNC_ENTER(NULL);

pdcid_t ret_value = SUCCEED;
pdcid_t pdcid;
struct _pdc_class *p = NULL;

FUNC_ENTER(NULL);

p = (struct _pdc_class *)PDC_malloc(sizeof(struct _pdc_class));
if (!p)
PGOTO_ERROR(FAIL, "PDC class property memory allocation failed\n");
Expand All @@ -84,11 +84,11 @@ PDC_class_create(const char *pdc_name)
pdcid_t
PDCinit(const char *pdc_name)
{
FUNC_ENTER(NULL);

pdcid_t ret_value = SUCCEED;
pdcid_t pdcid;

FUNC_ENTER(NULL);

if (NULL == (pdc_id_list_g = (struct pdc_id_list *)PDC_calloc(1, sizeof(struct pdc_id_list))))
PGOTO_ERROR(0, "PDC global id list: memory allocation failed");

Expand Down Expand Up @@ -123,9 +123,10 @@ PDCinit(const char *pdc_name)
perr_t
PDC_class__close(struct _pdc_class *p)
{
FUNC_ENTER(NULL);

perr_t ret_value = SUCCEED;

FUNC_ENTER(NULL);
#ifdef PDC_TIMING
PDC_timing_finalize();
#endif
Expand All @@ -139,10 +140,10 @@ PDC_class__close(struct _pdc_class *p)
perr_t
PDC_class_close(pdcid_t pdc)
{
perr_t ret_value = SUCCEED;

FUNC_ENTER(NULL);

perr_t ret_value = SUCCEED;

/* When the reference count reaches zero the resources are freed */
if (PDC_dec_ref(pdc) < 0)
PGOTO_ERROR(FAIL, "PDC: problem of freeing id");
Expand All @@ -155,10 +156,10 @@ PDC_class_close(pdcid_t pdc)
perr_t
PDC_class_end()
{
perr_t ret_value = SUCCEED;

FUNC_ENTER(NULL);

perr_t ret_value = SUCCEED;

if (PDC_destroy_type(PDC_CLASS) < 0)
PGOTO_ERROR(FAIL, "unable to destroy pdc class interface");

Expand All @@ -170,10 +171,10 @@ PDC_class_end()
perr_t
PDCclose(pdcid_t pdcid)
{
perr_t ret_value = SUCCEED;

FUNC_ENTER(NULL);

perr_t ret_value = SUCCEED;

#ifdef ENABLE_APP_CLOSE_SERVER
PDC_Client_close_all_server();
#endif
Expand Down
85 changes: 49 additions & 36 deletions src/api/pdc_analysis/include/pdc_analysis_and_transforms_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "pdc_prop_pkg.h"
#include "pdc_transforms_pkg.h"
#include "pdc_timing.h"
#include "mercury_proc_string.h"
#include "mercury_atomic.h"
#include <dlfcn.h>
Expand Down Expand Up @@ -202,195 +203,207 @@ typedef struct obj_data_iterator_out_t {
static HG_INLINE hg_return_t
hg_proc_analysis_ftn_in_t(hg_proc_t proc, void *data)
{
FUNC_ENTER(NULL);

hg_return_t ret;
analysis_ftn_in_t *struct_data = (analysis_ftn_in_t *)data;
ret = hg_proc_hg_const_string_t(proc, &struct_data->ftn_name);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_hg_const_string_t(proc, &struct_data->loadpath);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->local_obj_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->iter_in);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->iter_out);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
return ret;

FUNC_LEAVE(ret);
}

static HG_INLINE hg_return_t
hg_proc_obj_data_iterator_in_t(hg_proc_t proc, void *data)
{
FUNC_ENTER(NULL);

hg_return_t ret;
obj_data_iterator_in_t *struct_data = (obj_data_iterator_in_t *)data;
ret = hg_proc_uint64_t(proc, &struct_data->client_iter_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->object_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->reg_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->sliceCount);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->sliceNext);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->sliceResetCount);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->elementsPerSlice);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->slicePerBlock);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->elementsPerPlane);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->elementsPerBlock);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->skipCount);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->element_size);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->srcBlockCount);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->contigBlockSize);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->totalElements);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->ndim);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->dims_0);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->dims_1);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->dims_2);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->dims_3);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_int32_t(proc, &struct_data->storageinfo);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_int32_t(proc, &struct_data->server_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
return ret;

FUNC_LEAVE(ret);
}

static HG_INLINE hg_return_t
hg_proc_analysis_ftn_out_t(hg_proc_t proc, void *data)
{
FUNC_ENTER(NULL);

hg_return_t ret;
analysis_ftn_out_t *struct_data = (analysis_ftn_out_t *)data;

ret = hg_proc_uint64_t(proc, &struct_data->remote_ftn_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
return ret;

FUNC_LEAVE(ret);
}

static HG_INLINE hg_return_t
hg_proc_obj_data_iterator_out_t(hg_proc_t proc, void *data)
{
FUNC_ENTER(NULL);

hg_return_t ret;
obj_data_iterator_out_t *struct_data = (obj_data_iterator_out_t *)data;

ret = hg_proc_uint64_t(proc, &struct_data->server_iter_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->client_iter_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_uint64_t(proc, &struct_data->server_region_id);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
ret = hg_proc_int32_t(proc, &struct_data->ret);
if (ret != HG_SUCCESS) {
// HG_LOG_ERROR("Proc error");
return ret;
FUNC_LEAVE(ret);
}
return ret;

FUNC_LEAVE(ret);
}

/***************************************/
Expand Down
Loading
Loading