int next_free_tag_locked() { util::mpi_environment::scoped_try_lock l; if(l.locked) { MPI_Status status; int completed = 0; int ret = 0; ret = MPI_Test(&next_free_tag_request_, &completed, &status); HPX_ASSERT(ret == MPI_SUCCESS); if(completed)// && status->MPI_ERROR != MPI_ERR_PENDING) { return get_next_free_tag(); } } return -1; }
void run() { get_next_free_tag(); }