Skip to content

Commit

Permalink
handle more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 27, 2023
1 parent 4cce50a commit 601f36e
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions tests/ctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ void test_simple_bindexed2()
int i;
MPI_Request rcvid;
MPI_Status status;

int mpierr;

//block indexed of simple types
printf("\nBlock indexed type of MPI_INT, sending MPI_INT.\n");

Expand All @@ -257,7 +258,18 @@ void test_simple_bindexed2()

mpierr = MPI_Type_create_indexed_block(len, blocksize, displace,
MPI_INT, &mtype);
if(mpierr){
printf("\n>>>FAILED: %d %d\n",__LINE__,mpierr);
errcount++;
return;
}
mpierr = MPI_Type_commit(&mtype);
if(mpierr){
printf("\n>>>FAILED: %d %d\n",__LINE__,mpierr);
errcount++;
return;
}


#ifdef TEST_INTERNAL
copy_data(&a, &b, indexed_type);
Expand All @@ -266,12 +278,27 @@ void test_simple_bindexed2()

mpierr = MPI_Irecv(rbuf, 1, mtype,
0, 1, MPI_COMM_WORLD, &rcvid);
if(mpierr){
printf("\n>>>FAILED: %d %d\n",__LINE__,mpierr);
errcount++;
return;
}

mpierr = MPI_Send(sbuf, 4, MPI_INT,
0, 1, MPI_COMM_WORLD);

if(mpierr){
printf("\n>>>FAILED: %d %d\n",__LINE__,mpierr);
errcount++;
return;
}

mpierr = MPI_Wait(&rcvid, &status);
if(mpierr){
printf("\n>>>FAILED: %d %d\n",__LINE__,mpierr);
errcount++;
return;
}

#endif

printf("a = [");
Expand Down

0 comments on commit 601f36e

Please sign in to comment.