Hello there, a quick question about MPIALLREDUCE; I used this function in the following script
mpiComm Comm(mpiCommWorld, 0, 0);
real nubl = mpirank;
real nubg=0;
mpiAllReduce(nubg, nubl, mpiCommWorld, mpiSUM);
cout << “finnal SUM " << nubg << " elements” << " mpi "<< mpirank << " has " << nubl << endl;
real[int] S1(4),S2(4),S(4);
real MP;
MP = mpirank*2;
S = [0,0,0,0];
S2 = [MP,MP,MP,MP];
mpiAllReduce(S,S2, mpiCommWorld, mpiSUM);
cout << S << endl;
the data types are real and real[int]; it seems mpiALLReduce reinitialized my data; But I believe this function works fine when I am doing domain decomposition method;