fix a correctness issue by returning an error if waitall fails and invoking the mpi error handler

cmr:v1.7.2:reviewer=jsquyres