ESMCI / ESMCI/mpi-serial

Bug in irecv for derived datatypes

Open
#11 4 comments 0 reactions 1 assignee Assigned to @jedwards4b View on GitHub
bug
Dominant language
C
Stars
7
Forks
13
PR merge metrics
No merged PRs in 30d

Description

The following demonstrates a bug in using mpi derived types in the receive buffer, this is showing up when running (cesm) cam-se using mpi-serial. @gold2718 reported to pio, but it's an mpi-serial bug. Run using mpi on a single processor the result is:
-1 0 -1 1 -1 2 -1 3

however with mpi-serial the derived type is not respected and you get
0 1 2 3 -1 -1 -1 -1

```
#include
#include

int main(int argc, char **argv)
{
int mpierr;
int blocksize=1;
int len=4;
int displace[len];
MPI_Datatype mtype;
int sbuf[8];
int rbuf[8];
int i;
MPI_Request rcvid;
MPI_Status status;

mpierr = MPI_Init(&argc, &argv);

for (i=0;i<8;i++){
sbuf[i] = i;
}
for (i=0;i<8;i++){
rbuf[i] = -1;
}
for (i=0;i

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.