View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002044||OpenFOAM||Bug||public||2016-04-05 12:47||2016-04-06 12:27|
|Summary||0002044: UPstream compile error.|
|Description||commit 56668b24066c32665026b0613109f8627a7c7789 introduced the following error:|
UPstream.C:327:32: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
I solved it using the following code.
@@ -324,7 +324,7 @@ void Foam::UPstream::allToAll
|Tags||No tags attached.|
I got that issue as well this past weekend, but it was because I was using Open-MPI 1.6.5.
The latest supported Open-MPI version in OpenFOAM-dev is 1.10, which doesn't have this issue: https://github.com/OpenFOAM/ThirdParty-dev/blob/69dba76b3195420c71173a65b1c227b2650eaebf/README.org#parallel-processing
I haven't checked if other Open-MPI versions are working as intended.
The reason why using this "const_cast" isn't exactly the best idea, is because the data to be sent should be kept as read-only. Nonetheless, it could be used as a workaround for compatibility with older versions of Open-MPI.
@feymark: Which OpenMPI version are you using? Can you upgrade?
I agree with Bruno, casting-away the const-ness is bad and unnecessary and now the MPI calls handled const-ness correctly it would be good to use it.
||I was using the OpenMPI shipped with Ubuntu. I have updated my OpenMPI and now it works fine. What to do with the compatibility with older versions of Open-MPI I don't know.|
||@Bruno: do you know at what verision of OpenMPI proper handling of "const" was introduced? I am wondering how much trouble is going to be generated by the new functionality and if the const_cast will be needed for now.|
@Henry: After a somewhat quick search through https://github.com/open-mpi/ompi-release - It was introduced into Open-MPI 1.7.4, is present in 1.8.0 as well and onwards.
The git blame states that it was in late October 2013, on-time for 1.7.4 and 1.8.0: https://github.com/open-mpi/ompi-release/blame/f6841ec506009e9e0108279f584438dfbbf137cd/ompi/mpi/c/alltoall.c#L46 - but didn't make it to 1.7.3.
In contrast, Ubuntu 15.10 is the last of the Ubuntu's to have Open-MPI 1.6.5 (since Ubuntu 14.04): http://packages.ubuntu.com/search?keywords=libopenmpi-dev&searchon=names&suite=all§ion=all
Thanks for the details Bruno. Given that the hack is needed for all but the latest Ubuntu release I have decided to included it with a comment.
Resolved in OpenFOAM-dev by commit e290c253615c1a15b45b975ea08cfa2995e5fafd
|2016-04-05 12:47||feymark||New Issue|
|2016-04-05 13:11||wyldckat||Note Added: 0006086|
|2016-04-05 13:15||henry||Note Added: 0006087|
|2016-04-06 09:50||feymark||Note Added: 0006088|
|2016-04-06 11:52||henry||Note Added: 0006089|
|2016-04-06 12:07||wyldckat||Note Added: 0006090|
|2016-04-06 12:27||henry||Note Added: 0006091|
|2016-04-06 12:27||henry||Status||new => resolved|
|2016-04-06 12:27||henry||Resolution||open => fixed|
|2016-04-06 12:27||henry||Assigned To||=> henry|