[Dune] dune 2.6 - 2.7 compatibility

Oliver Sander oliver.sander at tu-dresden.de
Tue Feb 9 05:55:43 CET 2021


Hi Mona,

I think you approach should work, but the remaining should be done in
dune-grid-glue.  Could you please check the following small patch below?

Best,
Oliver

diff --git a/dune/grid-glue/gridglue.hh b/dune/grid-glue/gridglue.hh
index 6fe1015..4eaf2dd 100644
--- a/dune/grid-glue/gridglue.hh
+++ b/dune/grid-glue/gridglue.hh
@@ -20,12 +20,17 @@
  #include <dune/common/promotiontraits.hh>
  #include <dune/common/shared_ptr.hh>
  #include <dune/common/stdstreams.hh>
+#include <dune/common/version.hh>

  #include "adapter/gridgluecommunicate.hh"
  #include <dune/grid-glue/merging/merger.hh>

  #include <dune/common/parallel/mpitraits.hh>
+#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
  #include <dune/common/parallel/mpicommunication.hh>
+#else
+#include <dune/common/parallel/mpicollectivecommunication.hh>
+#endif
  #include <dune/common/parallel/indexset.hh>
  #include <dune/common/parallel/plocalindex.hh>
  #include <dune/common/parallel/remoteindices.hh>



On 08.02.21 23:19, Christoph Grüninger wrote:
> Hello Mona,
> which CPlantBox are you referring to? I found a project with root
> growth, but it seems to be unrelated to Dune or DuMux. So no visible
> dependency as far as I can see.
> 
> Is there a reason you cannot use Dune 2.7? According to DuMuX
> compatibility matrix [1], DuMuX 3.0 works with Dune 2.7.
> Further, in most cases code written for a Dune version x.y can be
> compiled with Dune version x.(y+1) with a couple of deprecation warnings.
> 
> Your approach should work, too. But it might be better to try a commit
> from the Git repository of dune-grid-glue, that might just work with
> Dune 2.6 without being an actual release. There are not many commits
> within the last two years. I'd start with 86408114 just from reading the
> commit messages. Might be, that there is no commit that works smoothly
> with Dune 2.6, though.
> 
> Bye
> Christoph
> 
> [1]
> https://dumux.org/installation/#compatible-versions-of-dune-and-hahahugoshortcode-s11-hbhb
> 
> Am 04.02.21 um 17:15 schrieb Giraud, Mona:
>>
>> Dear Dune developers,
>>
>> I am a student working with Dune, Dumux and CPlantBox.
>>
>> CPlantBox is compatible with  Dumux-3.0 and Dune-2.6.
>>
>> However, it also uses the the module dune-grid-glue. This module has no
>> 2.6 release so the 2.7 release is used instead.
>>
>> dune-grid-glue-2.7 requires the
>> file "dune-common/dune/common/parallel/mpicommunication.hh"
>>
>> It is not availale in dune-common-2.6:
>>
>> "/https://dune-project.org/releases/2.7.1//
>> /Deprecated header dune/common/parallel/collectivecommunication.hh which
>> will be removed after Dune 2.7. /
>> /Use dune/common/parallel/communication.hh instead!/
>> /Deprecated header dune/common/parallel/mpicollectivecommunication.hh
>> which will be removed after Dune 2.7. /
>> /Use dune/common/parallel/mpicommunication.hh instead!/"
>>
>> I therefore copied the mpicollectivecommunication.hh file and renamed
>> the copy mpicommunication.hh.
>> I ran some examples and everything seems to be working ok but, according
>> to your knowledge of dune and dune-grid-glue, do you think this ad-hoc
>> solution could create some issues that I have not detected?
>>
>> In case it might be useful, you will find attached the code used to
>> install and compile the modules (adapted from the bin_installdumux.py
>> file written by the dumux development team).
>>
>> Thank you for your help.
>> Best,
>> Mona Giraud

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20210209/d2155029/attachment.bin>


More information about the Dune mailing list