<div dir="ltr"><div>Okay, USE_MPI=ON is an OPM-specific. I have no idea how their build system deviates from ours. If your project is a (correctly configured) dune module, my solution should be sufficient. <br><br></div>Dominic</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 5:13 PM, Tobias Ritschel <span dir="ltr"><<a href="mailto:tobiasritschel@gmail.com" target="_blank">tobiasritschel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have tried to add<div><br></div><div>add_executable(runoilsim FI_Simulation.cpp)<br></div><div><div>add_dune_mpi_flags(runoilsim)</div></div><div><br></div><div>also without the first line, and I get the error</div><div><br></div><div><div>CMake Error at CMakeLists.txt:19 (add_dune_mpi_flags):</div><div>  Unknown CMake command "add_dune_mpi_flags".</div></div><div><br></div><div>The config file is included as the first in every .cpp file.</div><div><br></div><div>I believe I've stumbled upon a solution though. Running cmake with the option -DUSE_MPI=ON seems to have solved the problem. It was suggested when I was running cmake without it.</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 9 June 2015 at 16:51, Dominic Kempf <span dir="ltr"><<a href="mailto:dominic.r.kempf@gmail.com" target="_blank">dominic.r.kempf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The problem could of course also lie with not including config.h, which is where HAVE_MPI is defined.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 4:14 PM, Dominic Kempf <span dir="ltr"><<a href="mailto:dominic.r.kempf@gmail.com" target="_blank">dominic.r.kempf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hey Tobias,<br></div><div><br>The problem is that with our current build system, external packages like MPI need not only to be found but also explicitly enabled in order to be used. You can do this in your CMakeLists.txt file by adding:<br><br></div>add_dune_mpi_flags(targetname)<br><br></div>Note, that we are aiming to change this errorprone behaviour and to auto-enable all packages by default. Using git master you can instead use the macros from dune-common/cmake/modules/DuneEnableAllPackages.cmake<br></div></div><div><br></div>Best,<br></div>Dominic<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jun 9, 2015 at 4:03 PM, Tobias Ritschel <span dir="ltr"><<a href="mailto:tobiasritschel@gmail.com" target="_blank">tobiasritschel@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi<div><br></div><div>I am trying to implement a parallel linear solver using ISTL. For that I need to use the <i>OwnerOverlapCopyCommunication </i>class. I include</div><div><br></div><div>#include <dune/istl/owneroverlapcopy.hh></div><div><br></div><div>and when I try to compile I get the following error</div><div><br></div><div>/home/tobias/Documents/OPM_Optimization/src/OPMSim.cpp:556:52: error: 'OwnerOverlapCopyCommunication' is not a member of 'Dune'</div><div><br></div><div>From <i>owneroverlapcopy.hh</i> it seems that the <i>OwnerOverlapCopyCommunication </i>is only defined if HAVE_MPI is defined. I believe that the solution is to change the cmake files. I am currently using cmake files copied from opm-autodiff and haven't been able to find anything which searches for MPI.</div><div><br></div><div>Is it correct that this is what is causing the compilation error and could you point me towards a solution?</div><div><br></div><div>Kind regards</div><span><font color="#888888"><div>Tobias Ritschel</div></font></span></div>
<br></div></div>_______________________________________________<br>
Dune mailing list<br>
<a href="mailto:Dune@dune-project.org" target="_blank">Dune@dune-project.org</a><br>
<a href="http://lists.dune-project.org/mailman/listinfo/dune" target="_blank">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>