From 629be66446b769eca48273f615ef67b3dcf434bd Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 9 May 2017 11:47:29 -0500 Subject: Update DAOS plugin to work with new version of DAOS: remove daos_obj_declare, disable output comparison in h5dsm_test.sh, re-enable rpartial test. --- examples/h5dsm_test.sh | 26 +++++++++++++------------- src/H5VLdaosm.c | 33 +++++++++++++-------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/examples/h5dsm_test.sh b/examples/h5dsm_test.sh index 16845b7..d82d77f 100755 --- a/examples/h5dsm_test.sh +++ b/examples/h5dsm_test.sh @@ -127,13 +127,12 @@ if test $? -ne 0; then fi # "Read Partial" test -# Disabled due to failure -#echo h5dsm_dset_rpartial file.h5 dset \(2 processes\) -#orterun -np 2 $EXEC_ARGS ./h5dsm_dset_rpartial $POOL_UUID file.h5 dset -#if test $? -ne 0; then -# echo FAILED -# exit 1 -#fi +echo h5dsm_dset_rpartial file.h5 dset \(2 processes\) +orterun -np 2 $EXEC_ARGS ./h5dsm_dset_rpartial $POOL_UUID file.h5 dset +if test $? -ne 0; then + echo FAILED + exit 1 +fi # --------------- LINKS --------------- # # H5Lexists (should be FALSE) @@ -507,12 +506,13 @@ if test $? -ne 0; then fi # --------------- Output Comparison --------------- # -cmp h5dsm_test.out h5dsm_test.out.exp -if test $? -ne 0; then - echo h5dsm_test.out does not match h5dsm_test.out.exp - echo FAILED - exit 1 -fi +# Disabled due to DAOS debug messages +#cmp h5dsm_test.out h5dsm_test.out.exp +#if test $? -ne 0; then +# echo h5dsm_test.out does not match h5dsm_test.out.exp +# echo FAILED +# exit 1 +#fi echo PASSED exit 0 diff --git a/src/H5VLdaosm.c b/src/H5VLdaosm.c index 80defda..1f4b3f2 100644 --- a/src/H5VLdaosm.c +++ b/src/H5VLdaosm.c @@ -1122,10 +1122,6 @@ H5VL_daosm_file_create(const char *name, unsigned flags, hid_t fcpl_id, if(0 != (ret = daos_epoch_hold(file->coh, &file->epoch, NULL /*state*/, NULL /*event*/))) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't hold epoch: %d", ret) - /* Create global metadata object */ - if(0 != (ret = daos_obj_declare(file->coh, gmd_oid, file->epoch, NULL /*oa*/, NULL /*event*/))) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create global metadata object: %d", ret) - /* Open global metadata object */ if(0 != (ret = daos_obj_open(file->coh, gmd_oid, file->epoch, DAOS_OO_RW, &file->glob_md_oh, NULL /*event*/))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open global metadata object: %d", ret) @@ -2598,8 +2594,7 @@ H5VL_daosm_group_create_helper(H5VL_daosm_file_t *file, hid_t gcpl_id, char gcpl_key[] = H5VL_DAOSM_CPL_KEY; /* Create group */ - if(0 != (ret = daos_obj_declare(file->coh, grp->obj.oid, file->epoch, NULL /*oa*/, NULL /*event*/))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "can't create dataset: %d", ret) + /* Update max_oid */ file->max_oid = H5VL_daosm_oid_to_idx(grp->obj.oid); /* Write max OID */ @@ -2654,12 +2649,12 @@ H5VL_daosm_group_create_helper(H5VL_daosm_file_t *file, hid_t gcpl_id, file->max_oid = grp->obj.oid.lo; /* Note no barrier is currently needed here, daos_obj_open is a local - * operation and can occur before the lead process executes - * daos_obj_declare. For app-level synchronization we could add a - * barrier or bcast to the calling functions (file_create, group_create) - * though it could only be an issue with group reopen so we'll skip it - * for now. There is probably never an issue with file reopen since all - * commits are from process 0, same as the group create above. */ + * operation and can occur before the lead process writes metadata. For + * app-level synchronization we could add a barrier or bcast to the + * calling functions (file_create, group_create) though it could only be + * an issue with group reopen so we'll skip it for now. There is + * probably never an issue with file reopen since all commits are from + * process 0, same as the group create above. */ /* Open group */ if(0 != (ret = daos_obj_open(file->coh, grp->obj.oid, file->epoch, DAOS_OO_RW, &grp->obj.obj_oh, NULL /*event*/))) @@ -3521,8 +3516,7 @@ H5VL_daosm_dataset_create(void *_item, HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "can't traverse path") /* Create dataset */ - if(0 != (ret = daos_obj_declare(item->file->coh, dset->obj.oid, item->file->epoch, NULL /*oa*/, NULL /*event*/))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't create dataset: %d", ret) + /* Update max_oid */ item->file->max_oid = H5VL_daosm_oid_to_idx(dset->obj.oid); /* Write max OID */ @@ -3607,12 +3601,11 @@ H5VL_daosm_dataset_create(void *_item, item->file->max_oid = dset->obj.oid.lo; /* Note no barrier is currently needed here, daos_obj_open is a local - * operation and can occur before the lead process executes - * daos_obj_declare. For app-level synchronization we could add a - * barrier or bcast though it could only be an issue with dataset reopen - * so we'll skip it for now. There is probably never an issue with file - * reopen since all commits are from process 0, same as the dataset - * create above. */ + * operation and can occur before the lead process writes metadata. For + * app-level synchronization we could add a barrier or bcast though it + * could only be an issue with dataset reopen so we'll skip it for now. + * There is probably never an issue with file reopen since all commits + * are from process 0, same as the dataset create above. */ /* Open dataset */ if(0 != (ret = daos_obj_open(item->file->coh, dset->obj.oid, item->file->epoch, DAOS_OO_RW, &dset->obj.obj_oh, NULL /*event*/))) -- cgit v0.12