Boost C++ Libraries: Ticket #2399: Python boost.mpi.Request.test() crashes https://svn.boost.org/trac10/ticket/2399 <p> With the addition of the request_with_value type, the wrapper for request::test() was broken (can't convert optional&lt;status&gt; to Python type). A fix: </p> <pre class="wiki">const object request_test(request &amp;req) { ::boost::optional&lt;status&gt; stat = req.test(); if (stat) return object(*stat); else return object(); } </pre><p> and change the wrapper for Request to use &amp;request_test instead of &amp;cl::test. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2399 Trac 1.4.3 Matthias Troyer Fri, 07 Aug 2009 02:27:17 GMT <link>https://svn.boost.org/trac10/ticket/2399#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2399#comment:1</guid> <description> <p> This seems to be very close to what is actually implemented? Can you check whether this problem really exists? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 07 Aug 2009 15:27:08 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2399#comment:2 https://svn.boost.org/trac10/ticket/2399#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I'm closing this since I cannot see that the version in 1.36 is really different from what is proposed here. Earlier versions might have that problem but not 1.36 or higher. If the problem really exists please submit a test case. </p> Ticket anonymous Fri, 07 Aug 2009 16:35:10 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/2399#comment:3 https://svn.boost.org/trac10/ticket/2399#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> <p> Sure, it's just: </p> <p> import mpi </p> <p> if mpi.rank == 0: </p> <blockquote> <p> request = mpi.world.isend(value="foo", dest=1) print request.test() </p> </blockquote> <p> $ mpirun -np 2 python bug.py Traceback (most recent call last): </p> <blockquote> <p> File "bug.py", line 5, in &lt;module&gt; </p> <blockquote> <p> print request.test() </p> </blockquote> </blockquote> <p> <a class="missing wiki">TypeError</a>: No to_python (by-value) converter found for C++ type: boost::optional&lt;boost::mpi::status&gt; </p> Ticket anonymous Fri, 07 Aug 2009 16:36:36 GMT <link>https://svn.boost.org/trac10/ticket/2399#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2399#comment:4</guid> <description> <p> Sorry, I forgot to say, I just verified this in 1.39.0. The appropriate wrapper is there for request_with_value, but the same thing needs to be done for request . </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Matthias Troyer</dc:creator> <pubDate>Fri, 07 Aug 2009 17:05:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2399#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2399#comment:5</guid> <description> <p> Now I understand the issue. I've implemented your proposed fix on the trunk. an you please check whether it works? </p> </description> <category>Ticket</category> </item> </channel> </rss>