<div dir="ltr">This are Linux platforms, and I do not have administrative rights to change anything in this environment (it is shared, multiuser env, with this version of MPICH installed for quite time i guess). I could try to talk with administrators but i am not 100% sure that the code (posted in this mail) is correct.<br>
<div class="gmail_extra"><br></div><div class="gmail_extra">Best regards,<br></div><div class="gmail_extra">Kuba<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 12:03 AM, Lu, Huiwei <span dir="ltr"><<a href="mailto:huiweilu@mcs.anl.gov" target="_blank">huiweilu@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Kuba,<br>
<br>
Since it works with both Open MPI and BGP, it is most likely a problem of your MPICH installation or your platform.<br>
<br>
We have stopped supporting the Windows platform a while ago due to lack of developer resources. Please refer to our FAQ for more information:<br>
<a href="http://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_Why_can.27t_I_build_MPICH_on_Windows_anymore.3F" target="_blank">http://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_Why_can.27t_I_build_MPICH_on_Windows_anymore.3F</a><br>
<br>
If it is on windows platform, we recommend you use Microsoft MPI, which can be found here: <a href="http://msdn.microsoft.com/en-us/library/bb524831(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/bb524831(v=vs.85).aspx</a><br>
<br>
We also encourage you to use the latest MPICH on Linux or OSX platforms, which can be downloaded here: <a href="http://www.mpich.org/downloads/" target="_blank">http://www.mpich.org/downloads/</a><br>
<br>
—<br>
Huiwei<br>
<div><div><br>
On Jun 2, 2014, at 4:49 PM, Jakub Łuczyński <<a href="mailto:doubleloop@o2.pl" target="_blank">doubleloop@o2.pl</a>> wrote:<br>
<br>
> I wrote my assignment using MPI, and tested it both locally on Open MPI (1.6.5) and on IBM Blue Gene/P (with mpi implementation provided by IBM). Everything worked fine. Turns out that our solutions are tested also in our labs where MPICH, is installed:<br>
><br>
> $ mpich2version<br>
> MPICH2 Version: 1.4.1p1<br>
><br>
> And when I run my solution there I get this strange error:<br>
> $ mpirun -n 2 msp-par.exe 10 10 1<br>
> Internal Error: invalid error code 409e10 (Ring ids do not match) in MPIR_Reduce_impl:1087<br>
> Fatal error in PMPI_Reduce: Other MPI error, error stack:<br>
> PMPI_Reduce(1270).....: MPI_Reduce(sbuf=0x7fff693a92e8, rbuf=0x7fff693a9300, count=1, dtype=USER<struct>, op=0x98000000, root=0, MPI_COMM_WORLD) failed<br>
> MPIR_Reduce_impl(1087):<br>
><br>
> I am literally out of ideas what is wrong!<br>
><br>
> Below source code fragments (c++):<br>
><br>
> struct msp_solution<br>
> {<br>
> int x1, y1, x2, y2;<br>
> m_entry_t max_sum;<br>
> msp_solution();<br>
> msp_solution(const pair<int, int> &c1, const pair<int, int> &c2, int max_sum);<br>
> friend bool operator<(const msp_solution &s1, const msp_solution &s2);<br>
> };<br>
><br>
> void max_msp_solution(msp_solution *in, msp_solution *inout, int, MPI_Datatype*)<br>
> {<br>
> *inout = max(*in, *inout);<br>
> }<br>
><br>
> // somewhere in code<br>
> {<br>
> MPI_Datatype MPI_msp_solution_t;<br>
> MPI_Op max_msp_solution_op;<br>
><br>
> // create MPI struct from msp_solution<br>
> MPI_Datatype types[] = { MPI_INT, MPI_LONG_LONG_INT };<br>
> int block_lengths[] = { 4, 2 };<br>
> MPI_Aint base_addr, x1_addr, max_sum_addr;<br>
> MPI_Get_address(&collected_solution, &base_addr);<br>
> MPI_Get_address(&collected_solution.x1, &x1_addr);<br>
> MPI_Get_address(&collected_solution.max_sum, &max_sum_addr);<br>
><br>
> MPI_Aint displacements[] =<br>
> {<br>
> x1_addr - base_addr,<br>
> max_sum_addr - base_addr<br>
> };<br>
><br>
> MPI_Type_create_struct(2, block_lengths, displacements, types, &MPI_msp_solution_t);<br>
> MPI_Type_commit(&MPI_msp_solution_t);<br>
><br>
> // max reduction function<br>
> MPI_Op_create((MPI_User_function *) max_msp_solution, 1, &max_msp_solution_op);<br>
><br>
> ...<br>
><br>
> msp_solution solution, received_solution;<br>
> MPI_Comm comm,<br>
> ...<br>
> // comm is created using MPI_Comm_split<br>
> // solution is initialized<br>
> MPI_Reduce(&solution, &received_solution, 1, MPI_msp_solution_t, max_msp_solution_op , 0, MPI_COMM_WORLD);<br>
> // ERROR above!!!<br>
> }<br>
><br>
><br>
> Is there some error in this? How can I make it run?<br>
> P.S. MPI_Send and MPI_Recv on my struct MPI_msp_solution_t seems to work fine<br>
><br>
> Thanks in advance!<br>
> Best regards,<br>
> Kuba<br>
</div></div>> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
_______________________________________________<br>
discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mpich.org/mailman/listinfo/discuss" target="_blank">https://lists.mpich.org/mailman/listinfo/discuss</a></blockquote></div><br></div></div>