[mpich-discuss] Reduction with MPI_CHAR
Zhang, Junchao
jczhang at mcs.anl.gov
Fri Apr 5 10:21:44 CDT 2019
MPI 3.1 Chapter 5.9.3 reads "MPI_CHAR, MPI_WCHAR, and MPI_CHARACTER (which represent printable characters) cannot be used in reduction operations". But the following code with MPICH does not abort.
#include <mpi.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
char a ='A',b;
MPI_Init(&argc,&argv);
if(MPI_Allreduce(&a,&b,1,MPI_CHAR,MPI_SUM,MPI_COMM_WORLD)) abort();
MPI_Finalize();
}
--Junchao Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20190405/740e2aae/attachment.html>
More information about the discuss
mailing list