/* selector with default/naive Simgrid algorithms. These should not be trusted for performance evaluations */
-/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
{
MPI_Request request;
colls::iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, &request, 0);
- MPI_Request* requests = request->get_nbc_requests();
- int count = request->get_nbc_requests_size();
- Request::waitall(count, requests, MPI_STATUS_IGNORE);
- for (int other = 0; other < count; other++) {
- Request::unref(&requests[other]);
- }
- delete[] requests;
+ auto requests = request->get_nbc_requests();
+ Request::waitall(requests.size(), requests.data(), MPI_STATUS_IGNORE);
+ for(auto& req: requests)
+ Request::unref(&req);
Request::unref(&request);
return MPI_SUCCESS;
}