{
if (comm == MPI_COMM_NULL) {
return MPI_ERR_COMM;
- } if ((sendbuf == nullptr && count > 0) || ((comm->rank() == root) && recvbuf == nullptr)) {
+ } else if ((sendbuf == nullptr && count > 0) || ((comm->rank() == root) && recvbuf == nullptr)) {
return MPI_ERR_BUFFER;
} else if (datatype == MPI_DATATYPE_NULL || not datatype->is_valid()){
return MPI_ERR_TYPE;
{
if (comm == MPI_COMM_NULL) {
return MPI_ERR_COMM;
- } if ((sendbuf == nullptr && count > 0) || (recvbuf == nullptr)) {
+ } else if ((sendbuf == nullptr && count > 0) || (recvbuf == nullptr)) {
return MPI_ERR_BUFFER;
} else if (datatype == MPI_DATATYPE_NULL || not datatype->is_valid()) {
return MPI_ERR_TYPE;
static int myvalue = 0;
static void test_opts(int* argc, char **argv[]){
- int found = 0, ret;
+ int found = 0;
+ int ret;
static struct option long_options[] = {
{"long", no_argument, 0, 0 },
{0, 0, 0, 0 }
XBT_LOG_NEW_DEFAULT_CATEGORY(dsend,"the dsend test");
static void test_opts(int* argc, char **argv[]){
- int found = 0, ret;
+ int found = 0;
+ int ret;
int option_index = 0;
static struct option long_options[] = {
{"long", no_argument, 0, 0 },
#include <mpi.h>
static void test_opts(int* argc, char **argv[]){
- int found = 0, ret;
+ int found = 0;
+ int ret;
while ((ret = getopt(*argc, *argv, "s")) >= 0)
{
- switch (ret) {
- case 's':
+ if (ret == 's')
found = 1;
- break;
- }
}
if (found!=1){
printf("(smpi_)getopt failed ! \n");