static int is_2dmesh(int num, int *i, int *j)
{
int x, max = num / 2;
- x = sqrt(num);
+ x = sqrt(double(num));
while (x <= max) {
if ((num % x) == 0) {
send_type, void *recv_buff, int recv_count,
MPI_Datatype recv_type, MPI_Comm comm)
{
- MPI_Request *req, *req_ptr;
MPI_Aint extent;
int i, src, dst, rank, num_procs;
if (Y > X)
num_reqs = Y;
- req = (MPI_Request *) xbt_malloc(num_reqs * sizeof(MPI_Request));
-
- req_ptr = req;
+ MPI_Request* req = new MPI_Request[num_reqs];
+ MPI_Request* req_ptr = req;
// do local allgather/local copy
recv_offset = rank * block_size;
Request::waitall(X - 1, req, MPI_STATUSES_IGNORE);
- free(req);
+ delete[] req;
return MPI_SUCCESS;
}