next and hopefully final set of MPI_STATUS_IGNORE changes

This commit is contained in:
Axel Kohlmeyer
2014-11-26 12:21:25 -05:00
parent cb0a9998bd
commit 8f1e626e21
10 changed files with 87 additions and 91 deletions

View File

@ -328,10 +328,11 @@ void WriteData::atoms()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nAtoms # %s\n\n",atom->atom_style);
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -346,7 +347,7 @@ void WriteData::atoms()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_DOUBLE,0,0,world);
}
@ -381,10 +382,11 @@ void WriteData::velocities()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nVelocities\n\n");
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -399,7 +401,7 @@ void WriteData::velocities()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_DOUBLE,0,0,world);
}
@ -432,11 +434,12 @@ void WriteData::bonds()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
int index = 1;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nBonds\n\n");
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -452,7 +455,7 @@ void WriteData::bonds()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_LMP_TAGINT,0,0,world);
}
@ -485,11 +488,12 @@ void WriteData::angles()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
int index = 1;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nAngles\n\n");
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -505,7 +509,7 @@ void WriteData::angles()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_LMP_TAGINT,0,0,world);
}
@ -556,11 +560,12 @@ void WriteData::dihedrals()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
int index = 1;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nDihedrals\n\n");
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -576,7 +581,7 @@ void WriteData::dihedrals()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_LMP_TAGINT,0,0,world);
}
@ -627,11 +632,12 @@ void WriteData::impropers()
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
int index = 1;
if (me == 0) {
MPI_Status status;
MPI_Request request;
fprintf(fp,"\nImpropers\n\n");
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -647,7 +653,7 @@ void WriteData::impropers()
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_LMP_TAGINT,0,0,world);
}
@ -680,11 +686,12 @@ void WriteData::fix(int ifix, int mth)
// all other procs wait for ping, send their chunk to proc 0
int tmp,recvrow;
MPI_Status status;
MPI_Request request;
int index = 1;
if (me == 0) {
MPI_Status status;
MPI_Request request;
modify->fix[ifix]->write_data_section_keyword(mth,fp);
for (int iproc = 0; iproc < nprocs; iproc++) {
if (iproc) {
@ -700,7 +707,7 @@ void WriteData::fix(int ifix, int mth)
}
} else {
MPI_Recv(&tmp,0,MPI_INT,0,0,world,&status);
MPI_Recv(&tmp,0,MPI_INT,0,0,world,MPI_STATUS_IGNORE);
MPI_Rsend(&buf[0][0],sendrow*ncol,MPI_DOUBLE,0,0,world);
}