From 24a6f1425734eb3e6ffb9e37f510507a4a65ebd1 Mon Sep 17 00:00:00 2001 From: Rob Latham Date: Wed, 25 Feb 2015 10:52:22 -0600 Subject: [PATCH] fix build error if greq extensions not available Fall back to immediately completing the non-blocking request if we are unable to use the extended generalized request routines. --- ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_aio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_aio.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_aio.c index 88be6f1eaf..f4d78497e3 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_aio.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_aio.c @@ -121,6 +121,7 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, } /* --END ERROR HANDLING-- */ +#ifdef HAVE_MPI_GREQUEST_EXTENSIONS /* posted. defered completion */ if (ret == 0) { if (ADIOI_PVFS2_greq_class == 0) { @@ -132,6 +133,15 @@ void ADIOI_PVFS2_AIO_contig(ADIO_File fd, void *buf, int count, MPIX_Grequest_class_allocate(ADIOI_PVFS2_greq_class, aio_req, request); memcpy(&(aio_req->req), request, sizeof(*request)); } +#else + /* if generalized request extensions not available, we will have to process + * this operation right here */ + int error; + ret = PVFS_sys_wait(aio_req->op_id, "ADIOI_PVFS2_AIO_Contig", &error); + if (ret == 0) { + MPIO_Completed_request_create(&fd, len, error_code, request); + } +#endif /* immediate completion */ if (ret == 1) {