diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-15 18:41:10 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-15 18:41:10 (GMT) |
commit | 7e52acc8fd9435fe397d0f2d4424ced4ebfbf587 (patch) | |
tree | 0fbb9e7fd5ec472033b8b265a2fb9cba43d319f5 | |
parent | 85465b85d9b0986b2c9cffd06d490f7c92da42b9 (diff) | |
download | hdf5-7e52acc8fd9435fe397d0f2d4424ced4ebfbf587.zip hdf5-7e52acc8fd9435fe397d0f2d4424ced4ebfbf587.tar.gz hdf5-7e52acc8fd9435fe397d0f2d4424ced4ebfbf587.tar.bz2 |
[svn-r28668] - print hostname when starting server.
- set error values when file create or open fail.
-rw-r--r-- | examples/h5ff_server.c | 5 | ||||
-rw-r--r-- | src/H5VLiod_file.c | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/examples/h5ff_server.c b/examples/h5ff_server.c index 3da8fff..2ab2081 100644 --- a/examples/h5ff_server.c +++ b/examples/h5ff_server.c @@ -13,6 +13,9 @@ int main(int argc, char **argv) { int my_size, my_rank; int provided; + char hostname[1024]; + + gethostname(hostname, 1024); MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); if(MPI_THREAD_MULTIPLE != provided) { @@ -22,7 +25,7 @@ int main(int argc, char **argv) { MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); MPI_Comm_size(MPI_COMM_WORLD, &my_size); - printf("Number of server processes = %d, my rank is %d\n", my_size, my_rank); + printf("Number of server processes = %d, my rank is %d, hostname %s\n", my_size, my_rank, hostname); //H5open(); /* This call initiliazes the FS for the server processes (create metadata and diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c index 6b6412d..9c7c259 100644 --- a/src/H5VLiod_file.c +++ b/src/H5VLiod_file.c @@ -291,10 +291,8 @@ H5VL_iod_server_file_create_cb(AXE_engine_t H5_ATTR_UNUSED axe_engine, done: if(ret_value < 0) { - if(coh.cookie != IOD_OH_UNDEFINED) { - if((ret = iod_container_close(coh, NULL, NULL)) < 0) - HDONE_ERROR_FF(ret, "can't close container"); - } + if(coh.cookie != IOD_OH_UNDEFINED) + iod_container_close(coh, NULL, NULL); output.coh.cookie = IOD_OH_UNDEFINED; output.root_oh.rd_oh.cookie = IOD_OH_UNDEFINED; output.root_oh.wr_oh.cookie = IOD_OH_UNDEFINED; @@ -634,10 +632,8 @@ done: H5Pclose(output.fcpl_id); if(ret_value < 0) { - if(coh.cookie != IOD_OH_UNDEFINED) { - if((ret = iod_container_close(coh, NULL, NULL)) < 0) - HDONE_ERROR_FF(ret, "can't close container"); - } + if(coh.cookie != IOD_OH_UNDEFINED) + iod_container_close(coh, NULL, NULL); output.coh.cookie = IOD_OH_UNDEFINED; output.root_id = IOD_OBJ_INVALID; output.root_oh.rd_oh.cookie = IOD_OH_UNDEFINED; |