Opened 14 years ago
Last modified 13 years ago
#2399 reopened Bugs
Python boost.mpi.Request.test() crashes
Reported by: | Owned by: | Douglas Gregor | |
---|---|---|---|
Milestone: | Boost 1.37.0 | Component: | mpi |
Version: | Boost 1.36.0 | Severity: | Problem |
Keywords: | Cc: |
Description
With the addition of the request_with_value type, the wrapper for request::test() was broken (can't convert optional<status> to Python type). A fix:
const object request_test(request &req) { ::boost::optional<status> stat = req.test(); if (stat) return object(*stat); else return object(); }
and change the wrapper for Request to use &request_test instead of &cl::test.
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
comment:3 by , 13 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Sure, it's just:
import mpi
if mpi.rank == 0:
request = mpi.world.isend(value="foo", dest=1) print request.test()
$ mpirun -np 2 python bug.py Traceback (most recent call last):
File "bug.py", line 5, in <module>
print request.test()
TypeError: No to_python (by-value) converter found for C++ type: boost::optional<boost::mpi::status>
comment:4 by , 13 years ago
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 .
comment:5 by , 13 years ago
Now I understand the issue. I've implemented your proposed fix on the trunk. an you please check whether it works?
This seems to be very close to what is actually implemented? Can you check whether this problem really exists?