-/* Copyright (c) 2013-2020. The SimGrid Team.
+/* Copyright (c) 2013-2022. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* root is not on 0, allocate temp buffer for recv,
* rotate data at the end */
tempbuf = smpi_get_tmp_recvbuffer(rtrue_extent + (rcount * size - 1) * rextent);
- if (NULL == tempbuf) {
+ if (nullptr == tempbuf) {
err = MPI_ERR_OTHER;
line = __LINE__;
goto err_hndl;
} else if (!(vrank % 2)) {
/* other non-leaf nodes, allocate temp buffer for data received from
* children, the most we need is half of the total data elements due
- * to the property of binimoal tree */
+ * to the property of binomial tree */
tempbuf = smpi_get_tmp_sendbuffer(strue_extent + (scount * size - 1) * sextent);
- if (NULL == tempbuf) {
+ if (nullptr == tempbuf) {
err = MPI_ERR_OTHER;
line = __LINE__;
goto err_hndl;
return MPI_SUCCESS;
err_hndl:
- if (NULL != tempbuf)
- smpi_free_tmp_buffer(tempbuf);
+ if (nullptr != tempbuf)
+ smpi_free_tmp_buffer(tempbuf);
- XBT_DEBUG("%s:%4d\tError occurred %d, rank %2d", __FILE__, line, err, rank);
- return err;
+ XBT_DEBUG("%s:%4d\tError occurred %d, rank %2d", __FILE__, line, err, rank);
+ return err;
}
/*
*/
char* ptmp;
MPI_Request first_segment_req;
- MPI_Request* reqs = new (std::nothrow) MPI_Request[size];
- if (NULL == reqs) {
+ auto* reqs = new (std::nothrow) MPI_Request[size];
+ if (nullptr == reqs) {
ret = -1;
line = __LINE__;
- goto error_hndl; }
+ goto error_hndl;
+ }
typelng=rdtype->size();
rdtype->extent(&lb, &extent);