Giter Site home page Giter Site logo

opm-grid's Issues

Support for new parser deck is missing

With the old parser becoming obsolete (e.g. there is no way of using the WellsManager), I thorrowly need support to creat a CpGrid from a new parser deck.

Is there any plan of adding this and when will it happen?

loadbalancing on sequential runs changes the grid

if I create the grid from the Norne deck from opm-data with MPI enabled but in sequential mode, the number of elements in the first (and only) grid partition is different before and after the call to loadBalance(). This can be tested using the following program:

#include "config.h"

#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <dune/grid/CpGrid.hpp>

#include <dune/common/parallel/mpihelper.hh>

int main(int argc, char **argv)
{
    Dune::MPIHelper::instance(argc, argv);

    Opm::Parser parser;
    Opm::ParseMode parseMode({{ Opm::ParseMode::PARSE_RANDOM_SLASH , Opm::InputError::IGNORE }});
    const auto deck = parser.parseFile(argv[1], parseMode);
    const Opm::EclipseState eclState(deck, parseMode);

    std::vector<double> porv = eclState.getDoubleGridProperty("PORV")->getData();

    Dune::CpGrid grid;
    grid.processEclipseFormat(eclState.getEclipseGrid(),
                              /*isPeriodic=*/false,
                              /*flipNormals=*/false,
                              /*clipZ=*/false,
                              porv);


    int elemsBefore = grid.leafGridView().size(0);

    grid.loadBalance();
    grid.switchToDistributedView();

    int elemsAfter = grid.leafGridView().size(0);
    std::cout << "elemsBefore: " << elemsBefore << "\n"
              << "elemsAfter: " << elemsAfter << "\n";
    if (elemsBefore != elemsAfter)
        std::cout << "oops: number of elements is different!\n";

    return 0;
}

which on my machine produces the following output when it is feed with the Norne deck:

and@heuristix:~/tmp > ./cpTest /home/and/src/opm-data/norne/NORNE_ATW2013.DATA
VFPPROD bhp versus thp not monotonic increasing: 7/4224(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 9/3168(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 1/7296(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 6/15200(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 5/13300(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 11/13300(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 8/13300(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 10/13300(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 15/13680(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 3/15200(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 73/3360(2%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 335/6804(4%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 32/6804(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 54/6804(0%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 282/6912(4%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 87/6804(1%) elements failed test
VFPPROD bhp versus thp not monotonic increasing: 337/6048(5%) elements failed test
ERROR when handling keyword for well C-4H: Cannot open a well where all completions are shut
ERROR when handling keyword for well D-1H: Cannot open a well where all completions are shut
ERROR when handling keyword for well D-1H: Cannot open a well where all completions are shut
ERROR when handling keyword for well E-3AH: Cannot open a well where all completions are shut
ERROR when handling keyword for well D-3AH: Cannot open a well where all completions are shut
ERROR when handling keyword for well E-2H: Cannot open a well where all completions are shut
After loadbalancing process 0 has 44420 cells.
elemsBefore: 44431
elemsAfter: 44420
oops: number of elements is different!

Segfault/Valgrind error in CpGrid

Using the 'release/2013/03' branch I get a segmentation fault in the CpGrid. If it is run in Valgrind, it does not segfault, but produces the following output:

Processing eclipse data.
Building topology.
==5612== Conditional jump or move depends on uninitialised value(s)
==5612==    at 0xB542B0: void std::vector<int, std::allocator<int> >::_M_assign_aux<int*>(int*, int*, std::forward_iterator_tag) (vector.tcc:262)
==5612==    by 0xB514A2: void std::vector<int, std::allocator<int> >::_M_assign_dispatch<int*>(int*, int*, std::__false_type) (stl_vector.h:1217)
==5612==    by 0xB4E532: void std::vector<int, std::allocator<int> >::assign<int*>(int*, int*) (stl_vector.h:488)
==5612==    by 0xB4B0D1: Dune::(anonymous namespace)::buildTopo(processed_grid const&, std::vector<int, std::allocator<int> >&, Dune::cpgrid::OrientedEntityTable<0, 1>&, Dune::cpgrid::OrientedEntityTable<1, 0>&, Opm::SparseTable<int>&, std::vector<std::array<int, 8ul>, std::allocator<std::array<int, 8ul> > >&, std::vector<int, std::allocator<int> >&) (readEclipseFormat.cpp:557)
==5612==    by 0xB49051: Dune::CpGrid::processEclipseFormat(grdecl const&, double, bool, bool) (readEclipseFormat.cpp:191)
==5612==    by 0xB48D41: Dune::CpGrid::processEclipseFormat(Opm::EclipseGridParser const&, double, bool, bool, bool) (readEclipseFormat.cpp:164)
==5612==    by 0x9BC969: Ewoms::Spe9GridCreator<Ewoms::Properties::TTag::Spe9BlackOilProblem>::makeGrid() (spe9gridcreator.hh:74)
==5612==    by 0x9B6391: int Ewoms::start<Ewoms::Properties::TTag::Spe9BlackOilProblem>(int, char**) (start.hh:392)
==5612==    by 0x98DE8B: main (spe9_blackoil.cc:51)
==5612== 
==5612== Conditional jump or move depends on uninitialised value(s)
==5612==    at 0x9C09C1: std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long) (stl_vector.h:174)
==5612==    by 0xB54332: void std::vector<int, std::allocator<int> >::_M_assign_aux<int*>(int*, int*, std::forward_iterator_tag) (vector.tcc:267)
==5612==    by 0xB514A2: void std::vector<int, std::allocator<int> >::_M_assign_dispatch<int*>(int*, int*, std::__false_type) (stl_vector.h:1217)
==5612==    by 0xB4E532: void std::vector<int, std::allocator<int> >::assign<int*>(int*, int*) (stl_vector.h:488)
==5612==    by 0xB4B0D1: Dune::(anonymous namespace)::buildTopo(processed_grid const&, std::vector<int, std::allocator<int> >&, Dune::cpgrid::OrientedEntityTable<0, 1>&, Dune::cpgrid::OrientedEntityTable<1, 0>&, Opm::SparseTable<int>&, std::vector<std::array<int, 8ul>, std::allocator<std::array<int, 8ul> > >&, std::vector<int, std::allocator<int> >&) (readEclipseFormat.cpp:557)
==5612==    by 0xB49051: Dune::CpGrid::processEclipseFormat(grdecl const&, double, bool, bool) (readEclipseFormat.cpp:191)
==5612==    by 0xB48D41: Dune::CpGrid::processEclipseFormat(Opm::EclipseGridParser const&, double, bool, bool, bool) (readEclipseFormat.cpp:164)
==5612==    by 0x9BC969: Ewoms::Spe9GridCreator<Ewoms::Properties::TTag::Spe9BlackOilProblem>::makeGrid() (spe9gridcreator.hh:74)
==5612==    by 0x9B6391: int Ewoms::start<Ewoms::Properties::TTag::Spe9BlackOilProblem>(int, char**) (start.hh:392)
==5612==    by 0x98DE8B: main (spe9_blackoil.cc:51)
==5612== 
==5612== Invalid free() / delete / delete[] / realloc()
==5612==    at 0x4C2AA8C: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==5612==    by 0x9CDABF: __gnu_cxx::new_allocator<Dune::cpgrid::EntityRep<1> >::deallocate(Dune::cpgrid::EntityRep<1>*, unsigned long) (new_allocator.h:100)
==5612==    by 0x9C1F47: std::_Vector_base<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >::_M_deallocate(Dune::cpgrid::EntityRep<1>*, unsigned long) (stl_vector.h:175)
==5612==    by 0x9BAB46: std::_Vector_base<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >::~_Vector_base() (stl_vector.h:161)
==5612==    by 0x9B540C: std::vector<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >::~vector() (stl_vector.h:404)
==5612==    by 0xB54774: std::vector<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >::_M_move_assign(std::vector<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >&&, std::integral_constant<bool, true>) (stl_vector.h:1334)
==5612==    by 0xB51789: std::vector<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >::operator=(std::vector<Dune::cpgrid::EntityRep<1>, std::allocator<Dune::cpgrid::EntityRep<1> > >&&) (stl_vector.h:432)
==5612==    by 0xB4E74C: Opm::SparseTable<Dune::cpgrid::EntityRep<1> >::operator=(Opm::SparseTable<Dune::cpgrid::EntityRep<1> >&&) (SparseTable.hpp:54)
==5612==    by 0xB4E790: Dune::cpgrid::OrientedEntityTable<0, 1>::operator=(Dune::cpgrid::OrientedEntityTable<0, 1>&&) (OrientedEntityTable.hpp:101)
==5612==    by 0xB4EC3E: Dune::cpgrid::OrientedEntityTable<1, 0>::makeInverseRelation(Dune::cpgrid::OrientedEntityTable<0, 1>&) const (OrientedEntityTable.hpp:262)
==5612==    by 0xB4B268: Dune::(anonymous namespace)::buildTopo(processed_grid const&, std::vector<int, std::allocator<int> >&, Dune::cpgrid::OrientedEntityTable<0, 1>&, Dune::cpgrid::OrientedEntityTable<1, 0>&, Opm::SparseTable<int>&, std::vector<std::array<int, 8ul>, std::allocator<std::array<int, 8ul> > >&, std::vector<int, std::allocator<int> >&) (readEclipseFormat.cpp:586)
==5612==    by 0xB49051: Dune::CpGrid::processEclipseFormat(grdecl const&, double, bool, bool) (readEclipseFormat.cpp:191)
==5612==  Address 0xd601108 is 0 bytes after a block of size 8 alloc'd
==5612==    at 0x4C2BC97: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==5612==    by 0x9D9C5B: __gnu_cxx::new_allocator<Dune::GeometryType>::allocate(unsigned long, void const*) (new_allocator.h:94)
==5612==    by 0x9CCE84: std::_Vector_base<Dune::GeometryType, std::allocator<Dune::GeometryType> >::_M_allocate(unsigned long) (in /temp/lauser/src/ewoms-apps/spe9/spe9_blackoil)
==5612==    by 0x9C1101: void std::vector<Dune::GeometryType, std::allocator<Dune::GeometryType> >::_M_emplace_back_aux<Dune::GeometryType const&>(Dune::GeometryType const&) (vector.tcc:402)
==5612==    by 0x9B9A4C: std::vector<Dune::GeometryType, std::allocator<Dune::GeometryType> >::push_back(Dune::GeometryType const&) (stl_vector.h:891)
==5612==    by 0x9B52DD: Dune::cpgrid::IndexSet<Dune::CpGrid>::IndexSet(Dune::CpGrid const&) (Indexsets.hpp:67)
==5612==    by 0x9AD76F: Dune::CpGrid::CpGrid() (CpGrid.hpp:202)
==5612==    by 0x9BC92F: Ewoms::Spe9GridCreator<Ewoms::Properties::TTag::Spe9BlackOilProblem>::makeGrid() (spe9gridcreator.hh:71)
==5612==    by 0x9B6391: int Ewoms::start<Ewoms::Properties::TTag::Spe9BlackOilProblem>(int, char**) (start.hh:392)
==5612==    by 0x98DE8B: main (spe9_blackoil.cc:51)
==5612== 
Doing extra topology integrity check.
Building geometry.

if I switch to the 'master' branch, everything works fine...

entity_test fails with activated MPI

entity_test fails with activated MPI

The error message is
*** The MPI_Comm_rank() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.

The problem is that MPI_INIT is never called. I will provide a fix for the test.

PersistentContainer has different interface depending on DUNE 2.2 or 2.3 used

The class PersistentContainer has a different number of template parameters depending on whether it is linked to DUNE 2.2 or DUNE 2.3, and I (who are not really familiar enough with DUNE) don't quite see the use-case for this.

Why cannot the latter parameter in the inheritance of PersistentContainerVector have an allocator? (And why cannot PersistentContainer have std::allocator as default for its third parameter?)

building error

Guessing related to OPM/opm-parser#661. There are probably some other compiling errors following the following one.

153 /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp: In constructor ‘Dune::cpgrid::CombinedGridWellGraph::CombinedGridWellGraph(const Dune::CpGrid&, Opm::EclipseStateConstPtr, con    st double*, bool)’:
154 /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp:343:72: error: invalid use of incomplete type ‘const class Opm::Schedule’
155      std::vector<Opm::WellConstPtr> wells  = eclipseState->getSchedule()->getWells();
156                                                                         ^
157 In file included from /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.hpp:24:0,
158                  from /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp:26:
159 /home/kaib/OPM/debug/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.hpp:45:11: error: forward declaration of ‘const class Opm::Schedule’
160      class Schedule;
161            ^
162 /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp:345:53: error: invalid use of incomplete type ‘const class Opm::Schedule’
163      int last_time_step = eclipseState->getSchedule()->getTimeMap()->size()-1;
164                                                      ^
165 In file included from /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.hpp:24:0,
166                  from /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp:26:
167 /home/kaib/OPM/debug/opm-parser/opm/parser/eclipse/EclipseState/EclipseState.hpp:45:11: error: forward declaration of ‘const class Opm::Schedule’
168      class Schedule;
169            ^
170 /home/kaib/OPM/debug/dune-cornerpoint/dune/grid/common/ZoltanGraphFunctions.cpp:354:9: error: ‘CompletionSetConstPtr’ is not a member of ‘Opm’

blas_lapack.h disappeared with opm-core and breaks compilation

[ 69%] Building C object CMakeFiles/opmgrid.dir/opm/core/pressure/tpfa/trans_tpfa.c.o
/home/mblatt/OPM/opm-grid/opm/core/pressure/tpfa/trans_tpfa.c:7:41: fatal error: opm/core/linalg/blas_lapack.h: No such file or directory
compilation terminated.
CMakeFiles/opmgrid.dir/build.make:638: recipe for target 'CMakeFiles/opmgrid.dir/opm/core/pressure/tpfa/trans_tpfa.c.o' failed
make[2]: *** [CMakeFiles/opmgrid.dir/opm/core/pressure/tpfa/trans_tpfa.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/opmgrid.dir/all' failed
make[1]: *** [CMakeFiles/opmgrid.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

dune-cornerpoint can't load the SPE1 grid

if one tries to use 'sim_fibo_ad_cp` from opm-autodiff on the SPE1 deck, the following happens:

and@heuristix:~/src/opm-autodiff|remove_old_parser > ./bin/sim_fibo_ad_cp deck_filename=./spe1deck.data

================    Test program for fully implicit three-phase black-oil flow     ===============

---------------    Reading parameters     ---------------
deck_filename found at /, value is ./spe1deck.data
Program threw an exception: Keyword: ZCORN is not found in the container
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Keyword: ZCORN is not found in the container
[heuristix:13479] *** Process received signal ***
[heuristix:13479] Signal: Aborted (6)
[heuristix:13479] Signal code:  (-6)
[heuristix:13479] [ 0] /lib64/libc.so.6(+0x358d0) [0x7f7a20b238d0]
[heuristix:13479] [ 1] /lib64/libc.so.6(gsignal+0x39) [0x7f7a20b23849]
[heuristix:13479] [ 2] /lib64/libc.so.6(abort+0x148) [0x7f7a20b24cd8]
[heuristix:13479] [ 3] /usr/lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x175) [0x7f7a21119975]
[heuristix:13479] [ 4] /usr/lib64/libstdc++.so.6(+0x639f6) [0x7f7a211179f6]
[heuristix:13479] [ 5] /usr/lib64/libstdc++.so.6(+0x63a41) [0x7f7a21117a41]
[heuristix:13479] [ 6] /usr/lib64/libstdc++.so.6(__cxa_rethrow+0x46) [0x7f7a21117ca6]
[heuristix:13479] [ 7] ./bin/sim_fibo_ad_cp(main+0x251d) [0x8d1a9d]
[heuristix:13479] [ 8] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f7a20b0fbe5]
[heuristix:13479] [ 9] ./bin/sim_fibo_ad_cp() [0x8cf4a5]
[heuristix:13479] *** End of error message ***
Aborted

I interpret this as dune-cornerpoint not supporting the D{X,Y,Z}V keywords...

build from source failing with "Could NOT find dune-grid"

I have the following dune modules checked out on releases/2.6:
dune-common dune-istl dune-geometry dune-grid

for opm, i have the following in master branch as siblings of the dune modules above:
libecl opm-common opm-material opm-grid ewoms opm-simulators

I built the dune modules first one by one with the following code:

cd <module>
mkdir cmake-build-debug
cd cmake-build-debug
cmake  -DCMAKE_BUILD_TYPE=Debug .. -G Ninja
ninja

This succeeds.

I then did exactly the same for the opm modules. These succeed:libecl opm-common opm-material

However, opm-grid fails on the make step. Below is the last part of the output. Notice how it finds dune-common and dune-geometry but fails in dune-grid. (even though dune-grid/cmake-build-debug/lib/libdunegrid.a does exist and was build in the dune build steps above):

-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Performing Test HAVE_CXA_DEMANGLE
-- Performing Test HAVE_CXA_DEMANGLE - Failed
-- Could NOT find CxaDemangle (missing: HAVE_CXA_DEMANGLE) 
-- Performing Test HAVE_DUNE_COMMON
-- Performing Test HAVE_DUNE_COMMON - Success
-- Found dune-common: /Users/dhan/work/opm/dune-common  
-- Version 2.6.0 of dune-common from /Users/dhan/work/opm/dune-common/cmake-build-debug
-- Performing Test HAVE_DUNE_GEOMETRY
-- Performing Test HAVE_DUNE_GEOMETRY - Success
-- Found dune-geometry: /Users/dhan/work/opm/dune-geometry;/Users/dhan/work/opm/dune-common  
-- Version 2.6.0 of dune-geometry from /Users/dhan/work/opm/dune-geometry/cmake-build-debug
-- Could NOT find dune-uggrid (missing: dune-uggrid_DIR)
-- Performing Test HAVE_DUNE_UGGRID
-- Performing Test HAVE_DUNE_UGGRID - Failed
-- Could NOT find dune-uggrid (missing: dune-uggrid_FOUND) 
-- Performing Test HAVE_DUNE_GRID
-- Performing Test HAVE_DUNE_GRID - Success
CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find dune-grid (missing: dune-grid_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /Users/dhan/work/opm/opm-common/cmake/Modules/OpmPackage.cmake:134 (find_package_handle_standard_args)
  /Users/dhan/work/opm/opm-common/cmake/Modules/Finddune-grid.cmake:17 (find_opm_package)
  /Users/dhan/work/opm/opm-common/cmake/Modules/OpmFind.cmake:180 (find_package)
  /Users/dhan/work/opm/opm-common/cmake/Modules/OpmPackage.cmake:172 (find_and_append_package_to)
  opm-grid-prereqs.cmake:37 (find_package_deps)
  CMakeLists.txt:70 (include)

[Discussion] Moving files to proper directories

The current directory structure and organization of this module leaves a lot to be desired. Main points:

  • We put lots of code in the dune/ subdir, this is somewhat misleading as this is not a Dune core module. (Tangentially: we also put code in the Dune namespace, I think that is unfortunate for the same reason)
  • The opm/core subdir should die, and code from there moved to more specific dirs.

Starting point: I suggest to move all dune/grid/ files to opm/grid, and similarly move opm/core/grid/ files also to opm/grid. Also opm/core/ to opm/grid/. In the end all files would be in opm/grid.

Building issue in a cluster

Hello, I had the following problem when I was trying to build opm-grid in a cluster Stampede2 (https://www.tacc.utexas.edu/systems/stampede2).
I was able to build all the modules (dune-common dune-istl dune-geometry dune-grid libecl opm-common opm-parser opm-grid opm-material opm-output ewoms opm-simulators) in my local macbook in the same way. However, it did not somehow work in the cluster with Intel compiler. Can you tell what the problem is here?


Configuration message (cmake $OPM_CMAKE_OPTIONS ..)

-- The C compiler identification is Intel 17.0.0.20170411
-- The CXX compiler identification is Intel 17.0.0.20170411
-- Check for working C compiler: /opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpicc
-- Check for working C compiler: /opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpicxx
-- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test HAVE_C99
-- Performing Test HAVE_C99 - Success
-- Found C99: -std=c99  
-- Checking to see if CXX compiler accepts flag -std=c++14
-- Checking to see if CXX compiler accepts flag -std=c++14 - yes
-- Performing Test HAVE_FINAL
-- Performing Test HAVE_FINAL - Success
-- Performing Test HAVE_TYPE_TRAITS
-- Performing Test HAVE_TYPE_TRAITS - Success
-- Performing Test HAVE_SHARED_PTR
-- Performing Test HAVE_SHARED_PTR - Success
-- Performing Test HAVE_UNIQUE_PTR
-- Performing Test HAVE_UNIQUE_PTR - Success
-- Performing Test HAVE_NULLPTR
-- Performing Test HAVE_NULLPTR - Success
-- Performing Test HAVE_CONSTEXPR
-- Performing Test HAVE_CONSTEXPR - Success
-- Performing Test HAVE_ARRAY
-- Performing Test HAVE_ARRAY - Success
-- Performing Test HAVE_INTEGRAL_CONSTANT
-- Performing Test HAVE_INTEGRAL_CONSTANT - Success
-- Looking for C++ include tuple
-- Looking for C++ include tuple - found
-- Looking for C++ include tr1/tuple
-- Looking for C++ include tr1/tuple - found
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE - Success
-- Performing Test HAS_ATTRIBUTE_DEPRECATED
-- Performing Test HAS_ATTRIBUTE_DEPRECATED - Success
-- Performing Test HAS_ATTRIBUTE_DEPRECATED_MSG
-- Performing Test HAS_ATTRIBUTE_DEPRECATED_MSG - Success
-- Performing Test HAVE_STATIC_ASSERT
-- Performing Test HAVE_STATIC_ASSERT - Success
-- Performing Test HAVE_AUTO
-- Performing Test HAVE_AUTO - Success
-- Performing Test HAVE_VARIADIC_TEMPLATES
-- Performing Test HAVE_VARIADIC_TEMPLATES - Success
-- Performing Test HAVE_VARIADIC_CONSTRUCTOR_SFINAE
-- Performing Test HAVE_VARIADIC_CONSTRUCTOR_SFINAE - Success
-- Performing Test HAVE_RVALUE_REFERENCES
-- Performing Test HAVE_RVALUE_REFERENCES - Success
-- Looking for C++ include tr1/type_traits
-- Looking for C++ include tr1/type_traits - found
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   system
--   unit_test_framework
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Performing Test HAVE_CXA_DEMANGLE
-- Performing Test HAVE_CXA_DEMANGLE - Success
-- Performing Test HAVE_DUNE_COMMON
-- Performing Test HAVE_DUNE_COMMON - Success
-- Found dune-common: /work/02552/sogoogos/rmine/OPM_20180221/dune-common  
-- Version 2.4.2 of dune-common from /work/02552/sogoogos/rmine/OPM_20180221/dune-common/cmake-build-release
-- Performing Test HAVE_DUNE_GEOMETRY
-- Performing Test HAVE_DUNE_GEOMETRY - Success
-- Found dune-geometry: /work/02552/sogoogos/rmine/OPM_20180221/dune-geometry;/work/02552/sogoogos/rmine/OPM_20180221/dune-common  
-- Version 2.4.2 of dune-geometry from /work/02552/sogoogos/rmine/OPM_20180221/dune-geometry/cmake-build-release
CMake Warning at /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmPackage.cmake:85 (find_package):
  Could not find a package configuration file provided by "dune-uggrid" with
  any of the following names:

    dune-uggridConfig.cmake
    dune-uggrid-config.cmake

  Add the installation prefix of "dune-uggrid" to CMAKE_PREFIX_PATH or set
  "dune-uggrid_DIR" to a directory containing one of the above files.  If
  "dune-uggrid" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/Finddune-uggrid.cmake:3 (find_opm_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmFind.cmake:177 (find_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmPackage.cmake:99 (find_and_append_package_to)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/Finddune-grid.cmake:17 (find_opm_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmFind.cmake:177 (find_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmPackage.cmake:191 (find_and_append_package_to)
  opm-grid-prereqs.cmake:36 (find_package_deps)
  CMakeLists.txt:70 (include)


-- Performing Test HAVE_DUNE_UGGRID
-- Performing Test HAVE_DUNE_UGGRID - Failed
-- Could NOT find dune-uggrid (missing:  dune-uggrid_FOUND) 
-- Performing Test HAVE_DUNE_GRID
-- Performing Test HAVE_DUNE_GRID - Success
-- Found dune-grid: /work/02552/sogoogos/rmine/OPM_20180221/dune-grid;/work/02552/sogoogos/rmine/OPM_20180221/dune-common;/work/02552/sogoogos/rmine/OPM_20180221/dune-geometry  
-- Version 2.4.2 of dune-grid from /work/02552/sogoogos/rmine/OPM_20180221/dune-grid/cmake-build-release
CMake Warning at /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/FindParMETIS.cmake:95 (message):
  MPI not found ==> ParMETIS disabled! Plase make sure -DUSE_MPI=ON was set
  if you need ParMETIS.
Call Stack (most recent call first):
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmFind.cmake:175 (find_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmPackage.cmake:99 (find_and_append_package_to)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/Finddune-istl.cmake:14 (find_opm_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmFind.cmake:177 (find_package)
  /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake/Modules/OpmPackage.cmake:191 (find_and_append_package_to)
  opm-grid-prereqs.cmake:36 (find_package_deps)
  CMakeLists.txt:70 (include)


-- Could NOT find SuiteSparse (missing:  SuiteSparse_LIBRARIES SuiteSparse_INCLUDE_DIRS) 
-- Performing Test HAVE_DUNE_ISTL
-- Performing Test HAVE_DUNE_ISTL - Success
-- Found dune-istl: /work/02552/sogoogos/rmine/OPM_20180221/dune-istl;/work/02552/sogoogos/rmine/OPM_20180221/dune-common  
-- Version 2.4.2 of dune-istl from /work/02552/sogoogos/rmine/OPM_20180221/dune-istl/cmake-build-release
-- Found opm-common: /work/02552/sogoogos/rmine/OPM_20180221/opm-common/cmake-build-release/lib/libopmcommon.a  
-- Could NOT find CJSON (missing:  CJSON_INCLUDE_DIRS HAVE_CJSON) 
-- Found opm-parser: /work/02552/sogoogos/rmine/OPM_20180221/opm-parser/cmake-build-release/lib/libopmparser.a  
-- Could NOT find PTScotch (missing:  PTSCOTCH_INCLUDE_DIR SCOTCH_LIBRARY PTSCOTCH_LIBRARY PTSCOTCHERR_LIBRARY) 
-- Could NOT find ZOLTAN (missing:  ZOLTAN_LIBRARIES ZOLTAN_INCLUDE_DIRS) 
-- CMake version: 2.8.12.2
-- Linux distribution: CentOS Linux 7 (Core)
-- Target architecture: x86_64
-- Found Git: /opt/apps/git/2.9.0/bin/git (found version "2.9.0") 
-- Source code repository: git 986b266
-- Linker: ld 2.26.20160125
-- Precompiled headers: disabled
-- Build type: Release
-- OpenMP: disabled
-- Could NOT find CppCheck (missing:  CPPCHECK_PROGRAM) 
-- Disabling clang-check as CMAKE_EXPORT_COMPILE_COMMANDS is not enabled
-- Performing Test HAVE_DYNAMIC_BOOST_TEST
-- Performing Test HAVE_DYNAMIC_BOOST_TEST - Success
-- Writing config file "/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/cmake-build-release/config.h"...
-- This build defaults to installing in /work/02552/sogoogos/rmine/foo_20180221
-- Found Doxygen: /bin/doxygen (found version "1.8.5") 
-- Writing version information to local header project-version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /work/02552/sogoogos/rmine/OPM_20180221/opm-grid/cmake-build-release

-----------------------
## Building message (make $OPM_MAKE_OPTIONS)
...
Linking CXX executable bin/test_cartgrid
[ 80%] Built target test_cartgrid
Scanning dependencies of target test_column_extract
[ 82%] Building CXX object CMakeFiles/test_column_extract.dir/tests/test_column_extract.cpp.o
/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(43): error: type name is not allowed
      typename Dune::CpGrid::Traits::template Codim<codim>::
      ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(44): error: expected a ";"
          template Partition<Dune::Interior_Partition>::LeafIterator iit=grid.leafbegin<codim,Dune::Interior_Partition>();
                                                                     ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(45): error: type name is not allowed
      typename Dune::CpGrid::Traits::template Codim<codim>::
      ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(46): error: expected a ";"
          template Partition<Dune::InteriorBorder_Partition>::LeafIterator ibit=grid.leafbegin<codim,Dune::InteriorBorder_Partition>();
                                                                           ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(47): error: type name is not allowed
      typename Dune::CpGrid::Traits::template Codim<codim>::
      ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(48): error: expected a ";"
          template Partition<Dune::All_Partition>::LeafIterator ait=grid.leafbegin<codim,Dune::All_Partition>();
                                                                ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(49): error: identifier "iit" is undefined
      while(iit!=grid.leafend<codim,Dune::Interior_Partition>())
            ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(51): error: identifier "ibit" is undefined
          BOOST_REQUIRE((*iit==*ibit));
          ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(52): error: identifier "ait" is undefined
          BOOST_REQUIRE((*iit==*ait));
          ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(54): error: identifier "ibit" is undefined
          ++ibit;
            ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(55): error: identifier "ait" is undefined
          ++ait;
            ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(57): error: identifier "ibit" is undefined
      BOOST_REQUIRE((ibit==grid.leafend<codim,Dune::InteriorBorder_Partition>()));
      ^

/work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp(58): error: identifier "ait" is undefined
      BOOST_REQUIRE((ait==grid.leafend<codim,Dune::All_Partition>()));
      ^

compilation aborted for /work/02552/sogoogos/rmine/OPM_20180221/opm-grid/tests/cpgrid/partition_iterator_test.cpp (code 2)
make[2]: *** [CMakeFiles/partition_iterator_test.dir/tests/cpgrid/partition_iterator_test.cpp.o] Error 2
make[1]: *** [CMakeFiles/partition_iterator_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX executable bin/test_column_extract
[ 82%] Built target test_column_extract
make: *** [all] Error 2

Error in building opm-grid

Hi

I am getting the following error while trying to build opm-grid from scratch. It is related to #243 but cannot figure out where am I going wrong.

**loading initial cache file ../../options.cmake
-- CMake version: 3.7.2
-- Mac OS X version: 10.12.2 (16C67)
-- Target architecture: x86_64
-- Source code repository: git f81cd33
-- Linker: @(#)PROGRAM:ld  PROJECT:ld64-274.1
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.0.0, (clang-800.0.38)
TAPI support using: Apple TAPI version 1.30
-- Precompiled headers: disabled
-- Build type: Debug
-- All warnings enabled: -Wall
-- OpenMP: disabled
-- Finding package C99 using module mode
-- Finding package CXX11Features using module mode
-- Finding package Boost using module mode
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   system
--   unit_test_framework
-- Finding package MPI using module mode
-- Finding package dune-common using module mode
-- Finding package BLAS using module mode
-- A library with BLAS API found.
-- Finding package LAPACK using module mode
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Finding package CxaDemangle using module mode
-- Could NOT find CxaDemangle (missing:  HAVE_CXA_DEMANGLE) 
-- Version 2.3.1 of dune-common from /usr/local/Cellar/dune-common/2.3.1/lib/dunecontrol/dune-common/dune.module
-- Finding package dune-grid using module mode
-- Finding package dune-geometry using module mode
CMake Error at /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find dune-geometry (missing: HAVE_DUNE_GEOMETRY)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmPackage.cmake:368 (find_package_handle_standard_args)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/Finddune-geometry.cmake:14 (find_opm_package)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmFind.cmake:147 (find_package)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmPackage.cmake:279 (find_and_append_package_to)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/Finddune-grid.cmake:17 (find_opm_package)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmFind.cmake:147 (find_package)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmFind.cmake:211 (find_and_append_package_to)
  /Users/AkhilaRasamrtaMurthih/Documents/partTime/reserMine/setup/opm-common/cmake/Modules/OpmLibMain.cmake:112 (find_and_append_package_list_to)
  CMakeLists.txt:109 (include)


-- Configuring incomplete, errors occurred!**

I am sure I have dune-geometry package installed on my machine.

segmentation fault on Norne for > 8 processes

if I start Norne with flow on more than 8 processes, I get a segmentation fault on some ranks. the valgrind output for one of these is the following:

> mpirun -np 9 valgrind ./bin/flow NORNE_ATW2013
[...]
==12932== Memcheck, a memory error detector
==12932== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12932== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==12932== Command: ./bin/flow /home/and/src/opm-data/norne/NORNE_ATW2013 --output-dir=.
==12932== 
Manually moving well C-4H to partition 0
[...]
Manually moving well D-3BH to partition 0
==12932== Invalid read of size 4
==12932==    at 0x1A90775: Dune::CartesianIndexMapper<Dune::CpGrid>::computeCartesianSize() const (CartesianIndexMapper.hpp:24)
==12932==    by 0x1A90656: Dune::CartesianIndexMapper<Dune::CpGrid>::CartesianIndexMapper(Dune::CpGrid const&) (CartesianIndexMapper.hpp:33)
==12932==    by 0x1A88B7D: Ewoms::EclCpGridVanguard<Ewoms::Properties::TTag::EclFlowProblem>::loadBalance() (eclcpgridvanguard.hh:204)
==12932==    by 0x1A8763C: Ewoms::Simulator<Ewoms::Properties::TTag::EclFlowProblem>::Simulator(bool) (simulator.hh:132)
==12932==    by 0x19EDAB0: Opm::FlowMainEbos<Ewoms::Properties::TTag::EclFlowProblem>::setupEbosSimulator() (FlowMainEbos.hpp:437)
==12932==    by 0x19D569C: Opm::FlowMainEbos<Ewoms::Properties::TTag::EclFlowProblem>::execute(int, char**) (FlowMainEbos.hpp:211)
==12932==    by 0x19A9FBD: Opm::flowEbosBlackoilMain(int, char**) (flow_ebos_blackoil.cpp:59)
==12932==    by 0x1512552: main (flow.cpp:216)
==12932==  Address 0xa8 is not stack'd, malloc'd or (recently) free'd
==12932== 
==12932== 
==12932== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==12932==  Access not within mapped region at address 0xA8
==12932==    at 0x1A90775: Dune::CartesianIndexMapper<Dune::CpGrid>::computeCartesianSize() const (CartesianIndexMapper.hpp:24)
==12932==    by 0x1A90656: Dune::CartesianIndexMapper<Dune::CpGrid>::CartesianIndexMapper(Dune::CpGrid const&) (CartesianIndexMapper.hpp:33)
==12932==    by 0x1A88B7D: Ewoms::EclCpGridVanguard<Ewoms::Properties::TTag::EclFlowProblem>::loadBalance() (eclcpgridvanguard.hh:204)
==12932==    by 0x1A8763C: Ewoms::Simulator<Ewoms::Properties::TTag::EclFlowProblem>::Simulator(bool) (simulator.hh:132)
==12932==    by 0x19EDAB0: Opm::FlowMainEbos<Ewoms::Properties::TTag::EclFlowProblem>::setupEbosSimulator() (FlowMainEbos.hpp:437)
==12932==    by 0x19D569C: Opm::FlowMainEbos<Ewoms::Properties::TTag::EclFlowProblem>::execute(int, char**) (FlowMainEbos.hpp:211)
==12932==    by 0x19A9FBD: Opm::flowEbosBlackoilMain(int, char**) (flow_ebos_blackoil.cpp:59)
==12932==    by 0x1512552: main (flow.cpp:216)
==12932==  If you believe this happened as a result of a stack
==12932==  overflow in your program's main thread (unlikely but
==12932==  possible), you can try to increase the size of the
==12932==  main thread stack using the --main-stacksize= flag.
==12932==  The main thread stack size used in this run was 8388608.
==12932== 
==12932== HEAP SUMMARY:
==12932==     in use at exit: 184,070,185 bytes in 764,903 blocks
==12932==   total heap usage: 2,383,073 allocs, 1,618,170 frees, 772,582,716 bytes allocated
==12932== 
==12932== LEAK SUMMARY:
==12932==    definitely lost: 3,619,665 bytes in 34,822 blocks
==12932==    indirectly lost: 933,865 bytes in 142,951 blocks
==12932==      possibly lost: 5,903 bytes in 38 blocks
==12932==    still reachable: 179,510,752 bytes in 587,092 blocks
==12932==         suppressed: 0 bytes in 0 blocks
==12932== Rerun with --leak-check=full to see details of leaked memory
==12932== 
==12932== For counts of detected and suppressed errors, rerun with: -v
==12932== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

this seems to be a bug in the grid because (1) it works for e.g. 8 processes, and (2) the error occurs in CartesianIndexMapper.hpp and debugging this with gdb is challenging because calling cartesianDimensions() does not work:

(gdb) print this
$2 = (const Dune::CartesianIndexMapper<Dune::CpGrid> *) 0x45461e0
(gdb) print cartesianDimensions()
$3 = (const std::array<int, 3> &) <error reading variable>

Public header depends on config.h

CpGrid.hpp includes CpGridData.hpp, which uses the version macros. This makes CpGrid.hpp depend on config.h, which is prone to create trouble.

opm-grid seems to depend on opm-common but is only listed under "suggests"

The file opm-grid-prereqs.cmake uses the CMake macro find_package_deps which is defined in opm-common. So opm-grid depends on opm-common but in dune.module it is only listed under suggests.

An error occurred in the following setting: Module A suggests (and finds) opm-grid, Module B depends on module A (but not on OPM at all); configuring Module B leads to the following CMake error:

CMake Error at /home/timok/dumux-course/opm-grid/opm-grid-prereqs.cmake:37 (find_package_deps):
  Unknown CMake command "find_package_deps".

I tested version release 2018.10 and used dunecontrol. Shouldn't opm-grid depend on opm-common in that case? At least the call would need an if guard if opm-common is really optional.

dune-cornerpoint can't find dune-geometry or dune-istl

I have now been able to build DUNE release-cmake-2.2 on rhel 5, and also successfully built opm-core with dunecontrol:

nice dune-common/bin/dunecontrol --use-cmake --opts=config.opts all

But dune-cornerpoint is failing with the following (and many other similar) messages:

/private/laods/opm/RH5/realization_cmake/only_cmake/dune-grid/dune/grid/common/grid.hh:16:33: error: dune/geometry/type.hh: No such file or directory

If I look closer, this is returned at the end of the configure phase:

CMake Warning:
  Manually-specified variables were not used by the project:

    dune-geometry_DIR
    dune-istl_DIR

I guess this explaines my errors, but why does not dune-cornerpoint use these variables?

opm-grid cannot partition the SPE-10 grid

when trying to run the SPE10_MODEL2 deck that is shipped with opm-data on four cores and with ZOLTAN and PTScotch installed, I get this:

> mpirun -np 4 ./bin/flow output_dir=. SPE10_MODEL2.DATA

**********************************************************************
*                                                                    *
*                      This is flow 2018.04-pre                      *
*                                                                    *
* Flow is a simulator for fully implicit three-phase black-oil flow, *
*             including solvent and polymer capabilities.            *
*          For more information, see http://opm-project.org          *
*                                                                    *
**********************************************************************

After loadbalancing process 0 has 322630 cells.

I've waited for several hours but nothing further happened while the four cores stayed busy. I used the latest dune 2.5 git branch and an optimized build on ubuntu 16.04, i.e. GCC 5.4.0 in conjunction with -O3 -march=native -DNDEBUG on a Haswell CPU.

Reassigning wells to another process after loadbalance might break constraints.

We try to force the loadbalancer to keep all cells perforated by a well on one process. After it has run we check that this constraint holds. In the case of one well perforating cells assigned to more than one processor we reassign these cells to the one that perforates the most cells. In the case that a cell is perforated by multiple wells this approach might break the constraint for this cell due to moving it to a new process but leaving all other perforated ones on the old process.

To the very least we should run another check of the constraint and throw an exception if it does not hold. A better approach would be search multiply perforated cells and although use wells that perforate cells of this well into account.

dune-cornerpoint (and other OPM modules) fail to install properly because doc/doxygen/html/ is missing

Hi. I am trying to compile and install the OPM modules, but I am encountering some problems that I am unfamiliar with.

My OS is openSUSE 12.1 (GCC 4.6.2, autoconf 2.68, automake 1.11.1)

My approach:
Download DUNE 2.2.0 and extract the following modules in a directory:
dune-common-2.2.0
dune-geometry-2.2.0
dune-grid-2.2.0
dune-istl-2.2.0
dune-localfunctions-2.2.0

Also download the latest versions of the following OPM modules using git clone:
dune-cornerpoint
opm-benchmarks
opm-core
opm-porsol
opm-upscaling

I first run:
./dune-common-2.2.0/bin/dunecontrol all
Which seems to work fine (for completeness here's the output: http://pastebin.com/ng48PwVp).

I then run:
sudo ./dune-common-2.2.0/bin/dunecontrol make install
Which fails. The complete output is here: http://pastebin.com/pr771LVu
The error is at the bottom:

/bin/sh: line 4: cd: /home/ivarun/tmp/dune-cornerpoint/doc/doxygen/html/: No such file or directory
make[4]: *** [doxygen-html-install] Error 1
make[4]: Leaving directory /home/ivarun/tmp/dune-cornerpoint/doc/doxygen' make[3]: *** [install-doxygen] Error 2 make[3]: Leaving directory/home/ivarun/tmp/dune-cornerpoint/doc/doxygen'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory /home/ivarun/tmp/dune-cornerpoint/doc/doxygen' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory/home/ivarun/tmp/dune-cornerpoint/doc'
make: *** [install-recursive] Error 1
--- Failed to build dune-cornerpoint ---
Terminating dunecontrol due to previous errors!

If I try to install each module separately using the following command:
sudo ./dune-common-2.2.0/bin/dunecontrol --only=opm-benchmarks make install
I see that opm-benchmarks, opm-porsol and opm-upscaling all get the same error (i.e., missing /doc/doxygen/html/). It looks like perhaps everything except the documentation installs correctly, but without any documentation it's not easy to get started!

Any help understanding / fixing this issue would be greatly appreciated.

Cannot create a module thats depends on dune-cornerpoint

When I try to build a Dune module that depends on dune-cornerpoint, cmake fails because apparently the variable "dune-cornerpoint_PREFIX" is not set correctly, see the output below. The output was generated for a fresh module named "test" created with duneproject that should depend on dune-grid and dune-cornerpoint. The problem should be easy to reproduce.

I use DUNE 2.3.1 and the 2015.04 release of dune-cornerpoint.

--- calling all for test ---
--- calling vcsetup for test ---
--- calling autogen for test ---
Skipping dune-autogen because of CMake
--- calling configure for test ---
----- using default flags $CONFIGURE_FLAGS from /temp/bernd/DUMUX23/cmake5.0.opts -----
WARNING: could not find module parallelgrid,
       module is also unknown to pkg-config.
       Maybe you need to adjust PKG_CONFIG_PATH!
       parallelgrid is suggested by dune-cornerpoint
Skipping parallelgrid!
/temp/bernd/local/DUNE23CMake50/lib/dunegeometryam2cmake.lib for converting options does not exist
/temp/bernd/local/DUNE23CMake50/lib/duneistlam2cmake.lib for converting options does not exist
/temp/bernd/DUMUX23/opm-parser/lib/opmparseram2cmake.lib for converting options does not exist
/temp/bernd/DUMUX23/opm-core/lib/opmcoream2cmake.lib for converting options does not exist
/temp/bernd/DUMUX23/dune-cornerpoint/lib/dunecornerpointam2cmake.lib for converting options does not exist
/temp/bernd/DUMUX23/test/lib/testam2cmake.lib for converting options does not exist
 CXXFLAGS="-Wall -Wunused -Wmissing-include-dirs -Wcast-align -Wno-sign-compare -Wno-packed-bitfield-compat -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-literal-suffix -Wunused-but-set-variable -fno-strict-aliasing -DHAVE_NULLPTR=1" cmake -DCMAKE_MODULE_PATH=""  -DUSE_MPI=ON "-Ddune-common_DIR=/temp/bernd/local/DUNE23CMake50/lib64/cmake/dune-common" "-Ddune-geometry_DIR=/temp/bernd/local/DUNE23CMake50/lib64/cmake/dune-geometry" "-Ddune-grid_DIR=/temp/bernd/local/DUNE23CMake50/lib64/cmake/dune-grid" "-Ddune-istl_DIR=/temp/bernd/local/DUNE23CMake50/lib//cmake/dune-istl" "-Dopm-parser_DIR=/temp/bernd/DUMUX23/opm-parser/build-cmake-gcc50" "-Dopm-core_DIR=/temp/bernd/DUMUX23/opm-core/build-cmake-gcc50" "-Ddune-cornerpoint_DIR=/temp/bernd/DUMUX23/dune-cornerpoint/build-cmake-gcc50" -DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS=1 -DDUMUX_BUILD_ALL_TESTS:BOOL=FALSE -DCMAKE_MODULE_PATH=/temp/bernd/local/DUNE23CMake50/share/cmake/modules -DCMAKE_PREFIX_PATH="/usr/lib64/mpi/gcc/openmpi;/temp/bernd/external/metis-5.1.0;/temp/bernd/external/ALUGrid-1.52;/temp/bernd/external/ug-3.12.1;/temp/bernd/DUMUX23/ert;/temp/bernd/local/DUNE23CMake50;/temp/bernd/local/DUNE23CMake50/share;/temp/bernd/local/DUNE23CMake50/share/cmake/modules;/temp/bernd/local/DUNE23CMake50/share/cmake/scripts;" -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 -DCMAKE_C_COMPILER=/usr/bin/gcc-5 -Wno-dev --verbose --release -DCMAKE_DISABLE_FIND_PACKAGE_MPI=false "/temp/bernd/DUMUX23/test"
-- Dependencies for test: dune-grid;dune-cornerpoint
dune-grid, /temp/bernd/local/DUNE23CMake50
-- Dependencies for dune-grid: dune-common (>= 2.3);dune-geometry (>= 2.3)
dune-cornerpoint, 
CMake Error at /temp/bernd/local/DUNE23CMake50/share/dune/cmake/modules/DuneMacros.cmake:196 (message):
  Could not find dune.module file for module dune-cornerpoint in ,
  /lib/dunecontrol/dune-cornerpoint/
Call Stack (most recent call first):
  /temp/bernd/local/DUNE23CMake50/share/dune/cmake/modules/DuneMacros.cmake:350 (find_dune_package)
  /temp/bernd/local/DUNE23CMake50/share/dune/cmake/modules/DuneMacros.cmake:393 (dune_process_dependency_leafs)
  /temp/bernd/local/DUNE23CMake50/share/dune/cmake/modules/DuneMacros.cmake:417 (dune_create_dependency_leafs)
  /temp/bernd/local/DUNE23CMake50/share/dune/cmake/modules/DuneMacros.cmake:546 (dune_create_dependency_tree)
  CMakeLists.txt:19 (dune_project)


-- Configuring incomplete, errors occurred!
See also "/temp/bernd/DUMUX23/test/build-cmake-gcc50/CMakeFiles/CMakeOutput.log".

Compilation error with Dune2.4.1

237 In file included from /home/kaib/OPM-master-test/debug/opm-grid/tests/cpgrid/partition_iterator_test.cpp:15:0:
238 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh: In instantiation of ‘size_t CheckPartitionDataHandle<GridView, iftype>::size(const Entity&) const [with Entity = long unsigned int; GridView = Dune::GridView<Dune::DefaultLeafGridViewTrai    ts<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >; Dune::InterfaceType iftype = (Dune::InterfaceType)0u; size_t = long unsigned int]’:
239 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/common/datahandleif.hh:113:28:   required from ‘size_t Dune::CommDataHandleIF<DataHandleImp, DataTypeImp>::size(const EntityType&) const [with EntityType = long unsigned int; DataHandleImp = CheckPartitionDataHa    ndle<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>; DataTypeImp = int; size_t = long unsigned int]’
240 /home/kaib/OPM-master-test/debug/opm-grid/opm/grid/cpgrid/CpGridData.hpp:547:37:   required from ‘void Dune::cpgrid::CpGridData::communicateCodim(DataHandle&, Dune::CommunicationDirection, const InterfaceMap&) [with int codim = 3; DataHandle = Dune::CommDataHandleIF<CheckPartit    ionDataHandle<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>, int>; Dune::cpgrid::CpGridData::InterfaceMap = std::map<int, std::pair<Dune::InterfaceInformation, Dune::InterfaceInformation> >]’
241 /home/kaib/OPM-master-test/debug/opm-grid/opm/grid/cpgrid/CpGridData.hpp:607:9:   required from ‘void Dune::cpgrid::CpGridData::communicate(DataHandle&, Dune::InterfaceType, Dune::CommunicationDirection) [with DataHandle = Dune::CommDataHandleIF<CheckPartitionDataHandle<Dune::G    ridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>, int>]’
242 /home/kaib/OPM-master-test/debug/opm-grid/opm/grid/CpGrid.hpp:687:13:   required from ‘void Dune::CpGrid::communicate(DataHandle&, Dune::InterfaceType, Dune::CommunicationDirection) const [with DataHandle = Dune::CommDataHandleIF<CheckPartitionDataHandle<Dune::GridView<Dune::De    faultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>, int>]’
243 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/common/defaultgridview.hh:397:52:   required from ‘void Dune::DefaultLeafGridView<GridImp, pitype>::communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>&, Dune::InterfaceType, Dune::CommunicationDirection    ) const [with DataHandleImp = CheckPartitionDataHandle<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>; DataType = int; GridImp = Dune::CpGrid; Dune::PartitionIteratorType pitype = (Dune::PartitionIterato    rType)4u]’
244 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/common/gridview.hh:272:7:   required from ‘void Dune::GridView<ViewTraits>::communicate(Dune::CommDataHandleIF<DataHandleImp, DataType>&, Dune::InterfaceType, Dune::CommunicationDirection) const [with DataHandle    Imp = CheckPartitionDataHandle<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >, (Dune::InterfaceType)0u>; DataType = int; ViewTraits = Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u>]’
245 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:323:5:   required from ‘static void CheckPartitionDataHandle<GridView, iftype>::apply(const GridView&) [with GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::    PartitionIteratorType)4u> >; Dune::InterfaceType iftype = (Dune::InterfaceType)0u]’
246 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:351:93:   required from ‘void checkPartitionType(const GridView&) [with GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4u> >]’
247 /home/kaib/OPM-master-test/debug/opm-grid/tests/cpgrid/partition_iterator_test.cpp:101:45:   required from here
248 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:278:39: error: ‘dimension’ is not a member of ‘long unsigned int’
249      static_assert( (Entity::dimension == dimension), "Entity has invalid dimension." );
250                                        ^
251 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:279:41: error: ‘codimension’ is not a member of ‘long unsigned int’
252      static_assert( (Entity::codimension >= 0) || (Entity::codimension <= dimension), "Entity has invalid codimension." );
253                                          ^
254 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:279:71: error: ‘codimension’ is not a member of ‘long unsigned int’
255      static_assert( (Entity::codimension >= 0) || (Entity::codimension <= dimension), "Entity has invalid codimension." );
256                                                                        ^
257 /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include/dune/grid/test/checkpartition.hh:280:22: error: ‘codimension’ is not a member of ‘long unsigned int’
258      return (contains_[ Entity::codimension ] ? 2 : 0);

build errors

When I compile dune-cornerpoint modules with my ubuntu laptop errors occurs. my ubuntu version is 14.04 LTS, gcc 4.8.2, dune version 2.2.1. It's a little strange, since yesterday I build it with statoil workstation, no problems happened. Do anyone know what's the problems?

[  5%] Updating version information
[  5%] Built target update-version
[ 50%] Built target dunecornerpoint
Linking CXX executable bin/distribution_test
lib/libdunecornerpoint.a(readEclipseFormat.cpp.o): In function `Dune::cpgrid::CpGridData::processEclipseFormat(std::shared_ptr<Opm::Deck const>, double, bool, bool, bool)':
/home/liuming/Norne/dune-cornerpoint/dune/grid/cpgrid/readEclipseFormat.cpp:109: undefined reference to `Opm::EclipseGridInspector::EclipseGridInspector(std::shared_ptr<Opm::Deck const>)'
/home/liuming/Norne/dune-cornerpoint/dune/grid/cpgrid/readEclipseFormat.cpp:109: undefined reference to `Opm::EclipseGridInspector::EclipseGridInspector(std::shared_ptr<Opm::Deck const>)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/distribution_test] Error 1
make[1]: *** [CMakeFiles/distribution_test.dir/all] Error 2
make: *** [all] Error 2

Master does not compile

My dune library is make installed in a local folder, and I have dune-geometry built and installed for sure.
It is a parallel compilation.

-- Performing Test HAVE_CXA_DEMANGLE - Success
-- Finding package MPI using module mode
-- Found MPI_C: /home/kaib/software/petsc-3.7.3/arch-linux2-c-debug/lib/libmpi.so  
-- Found MPI_CXX: /home/kaib/software/petsc-3.7.3/arch-linux2-c-debug/lib/libmpicxx.so;/home/kaib/software/petsc-3.7.3/arch-linux2-c-debug/lib/libmpi.so  
-- Performing Test HAVE_DUNE_COMMON
-- Performing Test HAVE_DUNE_COMMON - Success
-- Found dune-common: /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/include  
-- Looking for MPI_Finalized
-- Looking for MPI_Finalized - found
-- Version 2.4.1 of dune-common from /home/kaib/local/dune2.4.1/release2.4.1_O2_g_mpi/lib/dunecontrol/dune-common/dune.module
-- Finding package dune-grid using module mode
-- Finding package dune-geometry using module mode
-- Performing Test HAVE_DUNE_GEOMETRY
-- Performing Test HAVE_DUNE_GEOMETRY - Failed
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find dune-geometry (missing: HAVE_DUNE_GEOMETRY)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmPackage.cmake:368 (find_package_handle_standard_args)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/Finddune-geometry.cmake:14 (find_opm_package)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmFind.cmake:147 (find_package)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmPackage.cmake:279 (find_and_append_package_to)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/Finddune-grid.cmake:17 (find_opm_package)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmFind.cmake:147 (find_package)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmFind.cmake:211 (find_and_append_package_to)
  /home/kaib/OPM-master-test/debug/opm-common/cmake/Modules/OpmLibMain.cmake:112 (find_and_append_package_list_to)
  CMakeLists.txt:109 (include)

dune-cornerpoint can't load the Norne grid

Before #81 this was hidden by the fact that EclipseGridParser could not load the deck:

and@heuristix:~/src/ewoms|master > cat tutorial/tutorial1.cc
#include "config.h"
#include <dune/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <dune/common/mpihelper.hh>

int main(int argc, char **argv)
{
    Dune::MPIHelper::instance(argc, argv);
    Opm::ParserPtr parser(new Opm::Parser);
    Opm::DeckConstPtr deck(parser->parseFile(argv[1]));

    Dune::CpGrid grid;
    grid.processEclipseFormat(deck, /*zTolerance=*/0, /*isPeriodic=*/false);

    return 0;
}
and@heuristix:~/src/ewoms|master > ./bin/tutorial1 /home/and/Norne/Norne_ATW_2013/NORNE_ATW2013.DATA
tutorial1: /home/and/src/dune-cornerpoint/dune/grid/cpgrid/readEclipseFormat.cpp:631: void Dune::<anonymous namespace>::buildTopo(const processed_grid &, std::vector<int> &, cpgrid::OrientedEntityTable<0, 1> &, cpgrid::OrientedEntityTable<1, 0> &, Opm::SparseTable<int> &, std::vector<array<int, 8> > &, std::vector<int> &): Assertion `f2c == f2c_again' failed.
[heuristix:26953] *** Process received signal ***
[heuristix:26953] Signal: Aborted (6)
[heuristix:26953] Signal code:  (-6)
[heuristix:26953] [ 0] /lib64/libc.so.6(+0x358d0) [0x7f2d04b2a8d0]
[heuristix:26953] [ 1] /lib64/libc.so.6(gsignal+0x39) [0x7f2d04b2a849]
[heuristix:26953] [ 2] /lib64/libc.so.6(abort+0x148) [0x7f2d04b2bcd8]
[heuristix:26953] [ 3] /lib64/libc.so.6(+0x2e616) [0x7f2d04b23616]
[heuristix:26953] [ 4] /lib64/libc.so.6(+0x2e6c2) [0x7f2d04b236c2]
[heuristix:26953] [ 5] ./bin/tutorial1() [0x4d8045]
[heuristix:26953] [ 6] ./bin/tutorial1(_ZN4Dune6cpgrid10CpGridData20processEclipseFormatERK6grdecldbb+0xf7) [0x4d7477]
[heuristix:26953] [ 7] ./bin/tutorial1(_ZN4Dune6cpgrid10CpGridData20processEclipseFormatESt10shared_ptrIKN3Opm4DeckEEdbbb+0x122f) [0x4d61ff]
[heuristix:26953] [ 8] ./bin/tutorial1(_ZN4Dune6CpGrid20processEclipseFormatESt10shared_ptrIKN3Opm4DeckEEdbbb+0x88) [0x4cca38]
[heuristix:26953] [ 9] ./bin/tutorial1(main+0x174) [0x4c3674]
[heuristix:26953] [10] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2d04b16be5]
[heuristix:26953] [11] ./bin/tutorial1() [0x4c3425]
[heuristix:26953] *** End of error message ***
Aborted

build breaks

I with @blattms' latest PR applied, I get build failures for the newest master versions of opm-core and dune-cornerpoint:

cd ~/src/dune-cornerpoint/; make VERBOSE=1
/usr/bin/cmake -H/home/and/src/dune-cornerpoint -B/home/and/src/dune-cornerpoint --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/and/src/dune-cornerpoint/CMakeFiles /home/and/src/dune-cornerpoint/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/and/src/dune-cornerpoint'
make -f CMakeFiles/dunecornerpoint.dir/build.make CMakeFiles/dunecornerpoint.dir/depend
make[2]: Entering directory `/home/and/src/dune-cornerpoint'
cd /home/and/src/dune-cornerpoint && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/and/src/dune-cornerpoint /home/and/src/dune-cornerpoint /home/and/src/dune-cornerpoint /home/and/src/dune-cornerpoint /home/and/src/dune-cornerpoint/CMakeFiles/dunecornerpoint.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/and/src/dune-cornerpoint'
make -f CMakeFiles/dunecornerpoint.dir/build.make CMakeFiles/dunecornerpoint.dir/build
make[2]: Entering directory `/home/and/src/dune-cornerpoint'
/usr/bin/cmake -E cmake_progress_report /home/and/src/dune-cornerpoint/CMakeFiles 9
[  5%] Building CXX object CMakeFiles/dunecornerpoint.dir/dune/grid/cpgrid/Intersection.cpp.o
/usr/bin/clang++   -DDUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD=1 -DHAVE_CONFIG_H=1 -std=c++11 -Wall -Wmissing-include-dirs -Wstrict-overflow -Wsign-compare -Wno-vla -Wno-cast-align -Wno-overloaded-virtual -Wno-unused-function -Wno-tautological-compare -ftemplate-backtrace-limit=0 -fstrict-overflow -pedantic -g -pipe -Wno-unknown-pragmas -O0 -DDEBUG -I/home/and/src/dune-cornerpoint -I/home/and/src/dune-common -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/hwloc/hwloc152/hwloc/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2019/libevent -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2019/libevent/include -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi -I/home/and/src/dune-grid -I/home/and/src/dune-geometry -I/home/and/src/external/ALUGrid-1.52/include -I/home/and/src/external/ALUGrid-1.52/include/serial -I/home/and/src/external/ALUGrid-1.52/include/duneinterface -I/home/and/src/external/ALUGrid-1.52/include/parallel -I/home/and/src/opm-core -I/usr/include/suitesparse -I/home/and/src/external/SuperLU_4.3/SRC -I/home/and/src/ert/install/include -I/home/and/src/dune-istl -I/home/and/src/opm-parser -I/home/and/src/opm-parser/opm/json    -o CMakeFiles/dunecornerpoint.dir/dune/grid/cpgrid/Intersection.cpp.o -c /home/and/src/dune-cornerpoint/dune/grid/cpgrid/Intersection.cpp
In file included from /home/and/src/dune-cornerpoint/dune/grid/cpgrid/Intersection.cpp:5:
In file included from /home/and/src/dune-cornerpoint/dune/grid/cpgrid/Intersection.hpp:54:
/home/and/src/dune-cornerpoint/dune/grid/cpgrid/CpGridData.hpp:517:1: warning: 'Mover' defined as a struct template
      here but previously declared as a class template [-Wmismatched-tags]
struct Mover
^
/home/and/src/dune-cornerpoint/dune/grid/cpgrid/CpGridData.hpp:99:37: note: did you mean struct here?
    template<class T, int i> friend class mover::Mover;
                                    ^~~~~
                                    struct
/home/and/src/dune-cornerpoint/dune/grid/cpgrid/CpGridData.hpp:90:26: note: did you mean struct here?
template<class T, int i> class Mover;
                         ^~~~~
                         struct
/home/and/src/dune-cornerpoint/dune/grid/cpgrid/CpGridData.hpp:551:31: error: implicit instantiation of undefined
      template 'Dune::cpgrid::Entity<0>'
        Entity<0> from_entity=Entity<0>(*gatherView_, from_cell_index, true);
                              ^
[...]

these seem to be caused by a circular dependency of the Entity and the CpGridData classes. Be aware that this error only occurs if using CLang. GCC manages to get around this because it seems to less strict at lex-time and when the code is actually instantiated, all required classes are around...

(note to @bska: you should probably start testing non-trivial PRs with clang as well...)

parallel communication does not work correctly

the following code should do a "round-trip" of the grid indices, but with Dune::CpGrid the assertation fails. The code is kind of large, but I guess that the code is a minimal example:

and@heuristix:~/src/ewoms|master > cat cpgrid_comm_test.cc
#include "config.h"

#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <dune/grid/CpGrid.hpp>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/common/datahandleif.hh>
#include <dune/grid/common/mcmgmapper.hh>

template <class EntityMapper, int commCodim>
class GridCommHandleBla
    : public Dune::CommDataHandleIF<GridCommHandleBla<EntityMapper, commCodim>, int>
{
public:
    GridCommHandleBla(const EntityMapper &mapper)
        : mapper_(mapper)
    {
        tmpArray_.resize(mapper.size());
    }

    void setForward(bool yesno)
    { isForward_ = yesno; }

    bool contains(int dim, int codim) const
    {
        // return true if the codim is the same as the codim which we
        // are asked to communicate with.
        return codim == commCodim;
    }

    bool fixedsize(int dim, int codim) const
    {
        // for each DOF we communicate a single value which has a
        // fixed size
        return true;
    }

    template <class EntityType>
    size_t size(const EntityType &e) const
    {
        // communicate a field type per entity
        return 1;
    }

    template <class MessageBufferImp, class EntityType>
    void gather(MessageBufferImp &buff, const EntityType &e) const
    {
        int dofIdx = mapper_.map(e);
        buff.write(dofIdx);
    }

    template <class MessageBufferImp, class EntityType>
    void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
    {
        int dofIdx = mapper_.map(e);

        int tmp;
        buff.read(tmp);

        if (isForward_)
            tmpArray_[dofIdx] = tmp;
        else
            assert(tmp == dofIdx);
    }

private:
    const EntityMapper &mapper_;
    std::vector<int> tmpArray_;
    bool isForward_;
};

int main(int argc, char **argv)
{
    Dune::MPIHelper::instance(argc, argv);

    const char *deckString =
        "RUNSPEC\n"
        "DIMENS\n"
        "3 3 3 /\n"
        "GRID\n"
        "DXV\n"
        "1 2 3 /\n"
        "DYV\n"
        "1 2 3 /\n"
        "DZV\n"
        "1 2 3 /\n"
        "DEPTHZ\n"
        "16*100.0 /\n";
    Opm::ParserPtr parser(new Opm::Parser());
    Opm::DeckConstPtr deck = parser->parseString(deckString);

    Dune::CpGrid grid;
    grid.processEclipseFormat(deck,
                              /*zTolerance=*/0,
                              /*isPeriodic=*/false,
                              /*flipNormals=*/false,
                              /*clipZ=*/false);
    grid.loadBalance();

    typedef Dune::CpGrid::LeafGridView GridView;
    typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
    const auto gridView = grid.leafGridView();
    ElementMapper elementMap(gridView);
    GridCommHandleBla<ElementMapper, 0> bla(elementMap);
    bla.setForward(true);
    gridView.communicate(bla,
                         Dune::InteriorBorder_All_Interface,
                         Dune::ForwardCommunication);
    bla.setForward(false);
    gridView.communicate(bla,
                         Dune::InteriorBorder_All_Interface,
                         Dune::BackwardCommunication);


    return 0;
}
and@heuristix:~/src/ewoms|master > make cpgrid_comm_test
Scanning dependencies of target cpgrid_comm_test
[100%] Building CXX object CMakeFiles/cpgrid_comm_test.dir/cpgrid_comm_test.cc.o
Linking CXX executable bin/cpgrid_comm_test
[100%] Built target cpgrid_comm_test
and@heuristix:~/src/ewoms|master > ./bin/cpgrid_comm_test 
and@heuristix:~/src/ewoms|master > mpirun -np 2 ./bin/cpgrid_comm_test 
cpgrid_comm_test: /home/and/src/ewoms/cpgrid_comm_test.cc:63: void GridCommHandleBla<Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, 4> >, Dune::MCMGElementLayout>, 0>::scatter(MessageBufferImp &, const EntityType &, size_t) [EntityMapper = Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, 4> >, Dune::MCMGElementLayout>, commCodim = 0, MessageBufferImp = Dune::MessageBufferIF<Dune::<anonymous>::MessageBuffer<int, std::allocator<int> > >, EntityType = Dune::cpgrid::Entity<0>]: Assertion `tmp == dofIdx' failed.
[heuristix:21231] *** Process received signal ***
[heuristix:21231] Signal: Aborted (6)
[heuristix:21231] Signal code:  (-6)
cpgrid_comm_test: /home/and/src/ewoms/cpgrid_comm_test.cc:63: void GridCommHandleBla<Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, 4> >, Dune::MCMGElementLayout>, 0>::scatter(MessageBufferImp &, const EntityType &, size_t) [EntityMapper = Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, 4> >, Dune::MCMGElementLayout>, commCodim = 0, MessageBufferImp = Dune::MessageBufferIF<Dune::<anonymous>::MessageBuffer<int, std::allocator<int> > >, EntityType = Dune::cpgrid::Entity<0>]: Assertion `tmp == dofIdx' failed.
[heuristix:21232] *** Process received signal ***
[heuristix:21232] Signal: Aborted (6)
[heuristix:21232] Signal code:  (-6)
[heuristix:21231] [ 0] /lib64/libpthread.so.0(+0xf9f0) [0x7f94718919f0]
[heuristix:21231] [ 1] /lib64/libc.so.6(gsignal+0x39) [0x7f9470dde849]
[heuristix:21231] [ 2] /lib64/libc.so.6(abort+0x148) [0x7f9470ddfcd8]
[heuristix:21231] [ 3] /lib64/libc.so.6(+0x2e616) [0x7f9470dd7616]
[heuristix:21231] [ 4] /lib64/libc.so.6(+0x2e6c2) [0x7f9470dd76c2]
[heuristix:21231] [ 5] ./bin/cpgrid_comm_test() [0x565a74]
[heuristix:21231] [ 6] ./bin/cpgrid_comm_test() [0x56593a]
[heuristix:21231] [ 7] ./bin/cpgrid_comm_test() [0x565696]
[heuristix:21231] [ 8] ./bin/cpgrid_comm_test() [0x5653f0]
[heuristix:21231] [ 9] ./bin/cpgrid_comm_test() [0x56518a]
[heuristix:21231] [10] ./bin/cpgrid_comm_test() [0x564db9]
[heuristix:21231] [11] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE20communicateFixedSizeILb0ENS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT0_+0x79a) [0x5778ba]
[heuristix:21231] [12] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE11communicateILb0ENS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT0_+0x3b) [0x5770cb]
[heuristix:21231] [13] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE8backwardINS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT_+0x1d) [0x57707d]
[heuristix:21231] [14] ./bin/cpgrid_comm_test(_ZN4Dune6cpgrid10CpGridData16communicateCodimILi0ENS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT0_NS_22CommunicationDirectionERNS_9InterfaceE+0x80) [0x56f090]
[heuristix:21231] [15] ./bin/cpgrid_comm_test(_ZN4Dune6cpgrid10CpGridData11communicateINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT_NS_13InterfaceTypeENS_22CommunicationDirectionE+0x7a) [0x56ec7a]
[heuristix:21231] [16] ./bin/cpgrid_comm_test(_ZNK4Dune6CpGrid11communicateINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsIS0_LNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT_NS_13InterfaceTypeENS_22CommunicationDirectionE+0x2d) [0x56ebed]
[heuristix:21231] [17] ./bin/cpgrid_comm_test(_ZNK4Dune19DefaultLeafGridViewINS_6CpGridELNS_21PartitionIteratorTypeE4EE11communicateI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsIS1_LS2_4EEEEENS_17MCMGElementLayoutEEELi0EEiEEvRNS_16CommDataHandleIFIT_T0_EENS_13InterfaceTypeENS_22CommunicationDirectionE+0x31) [0x56eb51]
[heuristix:21231] [18] ./bin/cpgrid_comm_test(_ZNK4Dune8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEE11communicateI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperIS5_NS_17MCMGElementLayoutEEELi0EEiEEvRNS_16CommDataHandleIFIT_T0_EENS_13InterfaceTypeENS_22CommunicationDirectionE+0x31) [0x56a0a1]
[heuristix:21231] [19] ./bin/cpgrid_comm_test(main+0x246) [0x55b806]
[heuristix:21231] [20] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f9470dcabe5]
[heuristix:21231] [21] ./bin/cpgrid_comm_test() [0x55b4e5]
[heuristix:21231] *** End of error message ***
[heuristix:21232] [ 0] /lib64/libpthread.so.0(+0xf9f0) [0x7fc5966369f0]
[heuristix:21232] [ 1] /lib64/libc.so.6(gsignal+0x39) [0x7fc595b83849]
[heuristix:21232] [ 2] /lib64/libc.so.6(abort+0x148) [0x7fc595b84cd8]
[heuristix:21232] [ 3] /lib64/libc.so.6(+0x2e616) [0x7fc595b7c616]
[heuristix:21232] [ 4] /lib64/libc.so.6(+0x2e6c2) [0x7fc595b7c6c2]
[heuristix:21232] [ 5] ./bin/cpgrid_comm_test() [0x565a74]
[heuristix:21232] [ 6] ./bin/cpgrid_comm_test() [0x56593a]
[heuristix:21232] [ 7] ./bin/cpgrid_comm_test() [0x565696]
[heuristix:21232] [ 8] ./bin/cpgrid_comm_test() [0x5653f0]
[heuristix:21232] [ 9] ./bin/cpgrid_comm_test() [0x56518a]
[heuristix:21232] [10] ./bin/cpgrid_comm_test() [0x564db9]
[heuristix:21232] [11] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE20communicateFixedSizeILb0ENS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT0_+0x79a) [0x5778ba]
[heuristix:21232] [12] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE11communicateILb0ENS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT0_+0x3b) [0x5770cb]
[heuristix:21232] [13] ./bin/cpgrid_comm_test(_ZN4Dune24VariableSizeCommunicatorISaISt4pairINS_20InterfaceInformationES2_EEE8backwardINS_6cpgrid22Entity2IndexDataHandleINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEELi0EEEEEvRT_+0x1d) [0x57707d]
[heuristix:21232] [14] ./bin/cpgrid_comm_test(_ZN4Dune6cpgrid10CpGridData16communicateCodimILi0ENS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT0_NS_22CommunicationDirectionERNS_9InterfaceE+0x80) [0x56f090]
[heuristix:21232] [15] ./bin/cpgrid_comm_test(_ZN4Dune6cpgrid10CpGridData11communicateINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT_NS_13InterfaceTypeENS_22CommunicationDirectionE+0x7a) [0x56ec7a]
[heuristix:21232] [16] ./bin/cpgrid_comm_test(_ZNK4Dune6CpGrid11communicateINS_16CommDataHandleIFI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsIS0_LNS_21PartitionIteratorTypeE4EEEEENS_17MCMGElementLayoutEEELi0EEiEEEEvRT_NS_13InterfaceTypeENS_22CommunicationDirectionE+0x2d) [0x56ebed]
[heuristix:21232] [17] ./bin/cpgrid_comm_test(_ZNK4Dune19DefaultLeafGridViewINS_6CpGridELNS_21PartitionIteratorTypeE4EE11communicateI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperINS_8GridViewINS_25DefaultLeafGridViewTraitsIS1_LS2_4EEEEENS_17MCMGElementLayoutEEELi0EEiEEvRNS_16CommDataHandleIFIT_T0_EENS_13InterfaceTypeENS_22CommunicationDirectionE+0x31) [0x56eb51]
[heuristix:21232] [18] ./bin/cpgrid_comm_test(_ZNK4Dune8GridViewINS_25DefaultLeafGridViewTraitsINS_6CpGridELNS_21PartitionIteratorTypeE4EEEE11communicateI17GridCommHandleBlaINS_35MultipleCodimMultipleGeomTypeMapperIS5_NS_17MCMGElementLayoutEEELi0EEiEEvRNS_16CommDataHandleIFIT_T0_EENS_13InterfaceTypeENS_22CommunicationDirectionE+0x31) [0x56a0a1]
[heuristix:21232] [19] ./bin/cpgrid_comm_test(main+0x246) [0x55b806]
[heuristix:21232] [20] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fc595b6fbe5]
[heuristix:21232] [21] ./bin/cpgrid_comm_test() [0x55b4e5]
[heuristix:21232] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 21232 on node heuristix exited on signal 6 (Aborted).
--------------------------------------------------------------------------
and@heuristix:~/src/ewoms|master > 

parallelgrid status

could somebody with access to parallelgrid please test whether it still works with dune-cornerpoint? If not, and if updating the support for parallelgrid within dune-cornerpoint is too much effort, we could get rid of the PersistentContainer classes...

compiling error when trying to build for parallel running

I installed MPI (mpich2), dune with parallel compilation, pt-scotch, zoltan, superlu.

Any clues about the following compilation error. I suggest we have a detailed instruction on how to configure and build for parallel running. It can kill a lot of time easily.

 835 In file included from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:0:
 836 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp: At global scope:
 837 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:155:77: error: wrong number of template arguments (2, should be 1)
 838              typedef Dune::GridView<DefaultLevelGridViewTraits<CpGrid, pitype> > LevelGridView;
 839                                                                              ^
 840 In file included from /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh:28:0,
 841                  from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:52,
 842                  from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:
 843 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/defaultgridview.hh:23:10: error: provided for ‘template<class GridImp> struct Dune::DefaultLevelGridViewTraits’
 844    struct DefaultLevelGridViewTraits
 845           ^
 846 In file included from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:0:
 847 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:155:79: error: template argument 1 is invalid
 848              typedef Dune::GridView<DefaultLevelGridViewTraits<CpGrid, pitype> > LevelGridView;
 849                                                                                ^
 850 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:159:76: error: wrong number of template arguments (2, should be 1)
 851              typedef Dune::GridView<DefaultLeafGridViewTraits<CpGrid, pitype> > LeafGridView;
 852                                                                             ^
 853 In file included from /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh:28:0,
 854                  from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:52,
 855                  from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:
 856 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/defaultgridview.hh:223:10: error: provided for ‘template<class GridImp> struct Dune::DefaultLeafGridViewTraits’
 857    struct DefaultLeafGridViewTraits {
 858           ^
 859 In file included from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:0:
 860 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:159:78: error: template argument 1 is invalid
 861              typedef Dune::GridView<DefaultLeafGridViewTraits<CpGrid, pitype> > LeafGridView;
 862                                                                               ^
 863 In file included from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:52:0,
 864                  from /home/kaib/OPM/build/dune-cornerpoint/dune/grid/common/GridPartitioning.cpp:41:
 865 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh: In instantiation of ‘class Dune::Grid<3, 3, double, Dune::CpGridFamily>’:
 866 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh:999:9:   required from ‘class Dune::GridDefaultImplementation<3, 3, double, Dune::CpGridFamily>’
 867 /home/kaib/OPM/build/dune-cornerpoint/dune/grid/CpGrid.hpp:198:18:   required from here
 868 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh:419:55: error: no type named ‘LeafGridView’ in ‘Dune::CpGridFamily::Traits {aka struct Dune::CpGridTraits}’
 869      typedef typename GridFamily::Traits::LeafGridView LeafGridView;
 870                                                        ^
 871 /home/kaib/local/dune2.3/release_mpi/include/dune/grid/common/grid.hh:421:56: error: no type named ‘LevelGridView’ in ‘Dune::CpGridFamily::Traits {aka struct Dune::CpGridTraits}’
 872      typedef typename GridFamily::Traits::LevelGridView LevelGridView;
 873                                                         ^

Is CpGrid::logical_cartesian_grid used anywhere?

I stumbled over logical_cartesian_grid in CpGrid and am wondering whether it is actually used anywhere. I did grep for it in OPM but to no avail.

According to the readEclipseFormat.cpp it even seems to store the exact same information as CpGrid::cartDims_, or am I missing something?

If not I would opt and volunteer to remove the redundant information.

Compile error in opm-grid

I am on a stock Ubuntu 16.04:

In file included from /home/hove/work/OPM/opm-grid/tests/cpgrid/grid_nnc.cpp:31:0:
/home/hove/work/OPM/opm-grid/opm/grid/CpGrid.hpp:1329:16: warning: 'template<class Grid> struct Dune::Capabilities::isParallel' is deprecated [-Wdeprecated-declarations]
         struct isParallel<CpGrid>
                ^
In file included from /home/hove/work/OPM/opm-grid/opm/grid/CpGrid.hpp:56:0,
                 from /home/hove/work/OPM/opm-grid/tests/cpgrid/grid_nnc.cpp:31:
/usr/include/dune/grid/common/capabilities.hh:72:5: note: declared here
     isParallel
     ^
/home/hove/work/OPM/opm-grid/tests/cpgrid/grid_nnc.cpp: In member function 'void Fixture::testCase(const string&, const Opm::NNC&, int, int, int, const std::vector<std::pair<int, int> >&, bool)':
/home/hove/work/OPM/opm-grid/tests/cpgrid/grid_nnc.cpp:79:44: error: 'elements' was not declared in this scope
         for (const auto& elem : elements(gv)) {
                                            ^
/home/hove/work/OPM/opm-grid/tests/cpgrid/grid_nnc.cpp:81:60: error: 'intersections' was not declared in this scope
             for (const auto& inter : intersections(gv, elem)) {
                                                            ^
CMakeFiles/grid_nnc.dir/build.make:62: recipe for target 'CMakeFiles/grid_nnc.dir/tests/cpgrid/grid_nnc.cpp.o' failed
make[2]: *** [CMakeFiles/grid_nnc.dir/tests/cpgrid/grid_nnc.cpp.o] Error 1
CMakeFiles/Makefile2:136: recipe for target 'CMakeFiles/grid_nnc.dir/all' failed
make[1]: *** [CMakeFiles/grid_nnc.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

must admit that building with MPI is not my strongest point - might be a triviality?

the loadBalance() method does not work for the Norne deck if MPI is enabled

this is even for single process runs (i.e., the loadBalance() method is supposed to be a no-op in this case):

the test program:

#include "config.h"
#include <dune/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <dune/common/parallel/mpihelper.hh>

int main(int argc, char **argv)
{
    Dune::MPIHelper::instance(argc, argv);
    Opm::ParserPtr parser(new Opm::Parser);
    Opm::DeckConstPtr deck(parser->parseFile(argv[1]));

    Dune::CpGrid grid;
    grid.processEclipseFormat(deck, /*zTolerance=*/0, /*isPeriodic=*/false);
    grid.loadBalance();
    std::cout << "hello, world!\n";
    return 0;
}

result on dune master with MPI disabled:

./test_prog /home/and/src/opm-data/norne/NORNE_ATW2013.DATA
CpGrid::scatterGrid() is non-trivial only with MPI support and if the target Dune platform is sufficiently recent.
hello, world!

(which is a bit confusing, but it does not fall on its nose.)

result with MPI support enabled:

./test_prog /home/and/src/opm-data/norne/NORNE_ATW2013.DATA
terminate called after throwing an instance of 'std::runtime_error'
  what():  [/home/and/src/dune-cornerpoint/dune/grid/cpgrid/CpGridData.cpp:536] rank for cell is too big
[heuristix:32579] *** Process received signal ***
[heuristix:32579] Signal: Aborted (6)
[heuristix:32579] Signal code:  (-6)
[heuristix:32579] [ 0] /lib64/libpthread.so.0(+0xf890) [0x7f9f1ce1d890]
[heuristix:32579] [ 1] /lib64/libc.so.6(gsignal+0x37) [0x7f9f1c372187]
[heuristix:32579] [ 2] /lib64/libc.so.6(abort+0x118) [0x7f9f1c373538]
[heuristix:32579] [ 3] /usr/lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x175) [0x7f9f1c960975]
[heuristix:32579] [ 4] /usr/lib64/libstdc++.so.6(+0x639f6) [0x7f9f1c95e9f6]
[heuristix:32579] [ 5] /usr/lib64/libstdc++.so.6(+0x63a41) [0x7f9f1c95ea41]
[heuristix:32579] [ 6] /usr/lib64/libstdc++.so.6(+0x63c58) [0x7f9f1c95ec58]
[heuristix:32579] [ 7] ./bin/tutorial1(_ZN4Dune6cpgrid10CpGridData20distributeGlobalGridERKNS_6CpGridERKS1_RKSt6vectorIiSaIiEEi+0x1f5) [0x592835]
[heuristix:32579] [ 8] ./bin/tutorial1(_ZN4Dune6CpGrid11scatterGridEi+0x55f) [0x55553f]
[heuristix:32579] [ 9] ./bin/tutorial1(_ZN4Dune6CpGrid11loadBalanceEi+0x1b) [0x54c22b]
[heuristix:32579] [10] ./bin/tutorial1(main+0x1d8) [0x54b178]
[heuristix:32579] [11] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f9f1c35eb05]
[heuristix:32579] [12] ./bin/tutorial1() [0x54aec3]
[heuristix:32579] *** End of error message ***
Aborted

gdb says that this happens somewhere in the call to loadBalance()...

Compile failure with MPI but no ZOLTAN

I get the following error:

/Users/atgeirr/opm-build-debug/opm-grid/dune/grid/cpgrid/CpGrid.cpp:129:40: error: use of undeclared identifier 'part_and_wells'
    return std::make_pair(true, get<1>(part_and_wells));

The part_and_wells variable is only defined in the HAVE_ZOLTAN part of the code.

anyone see this compilation error

Parallel buiding, with either dune 2.3.1 or dune 2.4.1. Ubuntu 16.04 with gcc version 5.4.

CMakeFiles/grid_test.dir/tests/grid_test.cc.o: In function `Dune::VTKWriter<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4> > >::pwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Dune::VTK::OutputType, int, int)':
/home/kaib/local/dune2.4.1/release2.4.1_O2_g/include/dune/grid/io/file/vtk/vtkwriter.hh:927: undefined reference to `Dune::concatPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/kaib/local/dune2.4.1/release2.4.1_O2_g/include/dune/grid/io/file/vtk/vtkwriter.hh:928: undefined reference to `Dune::relativePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/grid_test.dir/tests/grid_test.cc.o: In function `Dune::VTKWriter<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid, (Dune::PartitionIteratorType)4> > >::getSerialPieceName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/home/kaib/local/dune2.4.1/release2.4.1_O2_g/include/dune/grid/io/file/vtk/vtkwriter.hh:837: undefined reference to `Dune::concatPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/grid_test.dir/tests/grid_test.cc.o: In function `Dune::VTKWriter<Dune::GridView<Dune::PolyhedralGridViewTraits<3, 3, (Dune::PartitionIteratorType)4> > >::getSerialPieceName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/home/kaib/local/dune2.4.1/release2.4.1_O2_g/include/dune/grid/io/file/vtk/vtkwriter.hh:837: undefined reference to `Dune::concatPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/grid_test.dir/build.make:125: recipe for target 'bin/grid_test' failed
make[2]: *** [bin/grid_test] Error 1
CMakeFiles/Makefile2:168: recipe for target 'CMakeFiles/grid_test.dir/all' failed
make[1]: *** [CMakeFiles/grid_test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

CMakeError: CHOLMOD

Hi,
I now encountered the same building error as reported in issue #190 of opm-core:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CHOLMOD_LIBRARY
linked by target "cmTryCompileExec" in directory /private/laods/opm/RH5/realization_cmake/pure_cmake/bld/dune-cornerpoint-build/CMakeFiles/CMakeTmp

I have now built DUNE seperately (using tarballs 2.2.1) and use this command to build opm modules (opm-core built successfully):

cmake -C ../opts.cmake ../../src/dune-cornerpoint/

My opts.cmake file looks like this:

set(CMAKE_C_COMPILER "gcc" CACHE STRING "C compiler")
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "C++ compiler")
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "Fortran compiler")
set(CMAKE_INCLUDE_PATH "/work/include" CACHE STRING "Include path")
set(CMAKE_LIBRARY_PATH "/work/lib64" CACHE STRING "Library path")
set(dune-common_ROOT "/private/laods/opm/DUNE/dune-common-2.2.1" CACHE STRING "Path to dune-common")
set(dune-geometry_ROOT "/private/laods/opm/DUNE/dune-geometry-2.2.1" CACHE STRING "Path to dune-geometry")
set(dune-grid_ROOT "/private/laods/opm/DUNE/dune-grid-2.2.1" CACHE STRING "Path to dune-grid")
set(dune-istl_ROOT "/private/laods/opm/DUNE/dune-istl-2.2.1" CACHE STRING "Path to dune-istl")
set(SUPERLU_ROOT "/project/res/x86_64_RH_5/share/opm/SuperLU_4.0/" CACHE STRING "Path to SuperLU")
set(BOOST_ROOT /project/res/x86_64_RH_5/share/opm/boost CACHE STRING "Path to boost")
#set(ERT_ROOT "/home/atgeirr/install/ert-install" CACHE STRING "Path to ERT")
set(PRECOMPILE_HEADERS OFF CACHE BOOL "Precompiled headers")

p2pcommunicator_test does not compile

/home/mblatt/src/dune/opm/dune-cornerpoint/dune/grid/common/p2pcommunicator.hh: In instantiation of ‘Dune::Point2PointCommunicator<MsgBuffer, Comm>::Point2PointCommunicator() [with MsgBuffer = Dune::SimpleMessageBuffer; Comm = ompi_communicator_t*]’:
/home/mblatt/src/dune/opm/dune-cornerpoint/tests/p2pcommunicator_test.cc:103:23:   required from here
/home/mblatt/src/dune/opm/dune-cornerpoint/dune/grid/common/p2pcommunicator.hh:155:42: error: no matching function for call to ‘Dune::CollectiveCommunication<ompi_communicator_t*>::CollectiveCommunication()’
     Point2PointCommunicator() : BaseType() { removeLinkage(); }
                                          ^
/home/mblatt/src/dune/opm/dune-cornerpoint/dune/grid/common/p2pcommunicator.hh:155:42: note: candidates are:
In file included from /home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpihelper.hh:11:0,
                 from /home/mblatt/src/dune/opm/dune-cornerpoint/dune/grid/common/p2pcommunicator.hh:27,
                 from /home/mblatt/src/dune/opm/dune-cornerpoint/tests/p2pcommunicator_test.cc:7:
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:149:5: note: Dune::CollectiveCommunication<ompi_communicator_t*>::CollectiveCommunication(ompi_communicator_t* const&)
     CollectiveCommunication (const MPI_Comm& c)
     ^
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:149:5: note:   candidate expects 1 argument, 0 provided
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:145:9: note: constexpr Dune::CollectiveCommunication<ompi_communicator_t*>::CollectiveCommunication(const Dune::CollectiveCommunication<ompi_communicator_t*>&)
   class CollectiveCommunication<MPI_Comm>
         ^
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:145:9: note:   candidate expects 1 argument, 0 provided
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:145:9: note: constexpr Dune::CollectiveCommunication<ompi_communicator_t*>::CollectiveCommunication(Dune::CollectiveCommunication<ompi_communicator_t*>&&)
/home/mblatt/src/dune/opm/dune-common/dune/common/parallel/mpicollectivecommunication.hh:145:9: note:   candidate expects 1 argument, 0 provided

CpGrid does not adhere to the DUNE grid interface

At least it does not adhere to the interface of Dune 2.4 because the gridcheck() function which is shipped with Dune does not even compile:

#include "config.h"

#include <dune/grid/CpGrid.hpp>

#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>

#define DISABLE_DEPRECATED_METHOD_CHECK 1
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,4)
#include <dune/grid/test/gridcheck.hh>
#else
#include <dune/grid/test/gridcheck.cc>
#endif

#include <dune/common/parallel/mpihelper.hh>

const char *deckString =
    "RUNSPEC\n"
    "METRIC\n"
    "DIMENS\n"
    "2 2 2 /\n"
    "GRID\n"
    "DXV\n"
    "2*1 /\n"
    "DYV\n"
    "2*1 /\n"
    "DZ\n"
    "8*1 /\n"
    "TOPS\n"
     "4*100.0 /\n";

int main(int argc, char **argv)
{
    Dune::MPIHelper::instance(argc, argv);

    Opm::Parser parser;
    const auto deck = parser.parseString(deckString);

    Dune::CpGrid grid;
    grid.processEclipseFormat(deck, false);

    gridcheck(grid);
}

currently this makes the compiler produce something like this:

In file included from /home/and/src/dune-cornerpoint/tests/cpgrid/mytest.cpp:10:
In file included from /home/and/src/dune-grid/dune/grid/test/gridcheck.hh:20:
/home/and/src/dune-grid/dune/grid/test/staticcheck.hh:59:28: error: no type named
      'EntitySeed' in 'Dune::cpgrid::Entity<0>'
  typedef typename Entity::EntitySeed EntitySeed DUNE_UNUSED;
[...]

amongst quite a few other errors.

HAVE_OPM_GRID is set to 0 although opm-grid is found

Steps to reproduce this, at least for me:

mkdir TestOpmGrid; cd TestOpmGrid

git clone -b 2018.04 https://github.com/Statoil/libecl.git
mkdir libecl/build; cd libecl/build; cmake ..; make -j7; cd ../..

for MOD in common geometry grid localfunctions istl; do 
git clone -b releases/2.6 https://gitlab.dune-project.org/core/dune-$MOD.git;
done
git clone -b feature/support-cpgrid https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git

git clone -b release/2018.04 https://github.com/OPM/opm-common.git
git clone -b release/2018.04 https://github.com/OPM/opm-grid.git
cd opm-grid; patch -p1 <../dumux/patches/opm-grid-2018.04.patch; cd ..

export ecl_DIR=$PWD/libecl/build
CMAKE_FLAGS="-Decl_DIR=$ecl_DIR" ./dune-common/bin/dunecontrol all

grep 'opm' dumux/build-cmake/CMakeCache.txt
grep 'HAVE_OPM' dumux/build-cmake/config.h

This gives me

bernd@aladdin:/temp2/bernd/TestOpmGrid> grep 'opm' dumux/build-cmake/CMakeCache.txt
CMAKE_MODULE_PATH:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-common/cmake/Modules
opm-common_DIR:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-common/build-cmake
opm-grid_DIR:UNINITIALIZED=/temp2/bernd/TestOpmGrid/opm-grid/build-cmake
//Details about finding opm-common
FIND_PACKAGE_MESSAGE_DETAILS_opm-common:INTERNAL=[/temp2/bernd/TestOpmGrid/opm-common/build-cmake/lib/libopmcommon.a][v()]
bernd@aladdin:/temp2/bernd/TestOpmGrid> grep 'HAVE_OPM' dumux/build-cmake/config.h
#define HAVE_OPM_GRID 0

Installation problem opm-grid

Dear All,
I was able to install dune-common-2.6.0, dune-geometry-2.6.0, dune-grid-2.6.0, dune-istl-2.6.0, dune-localfunctions-2.6.0 and dune-typetree-2.6.0.
After the successful installation of opm-common (10.2017) and opm-material (10.2017), I however fail to add opm-grid (10.217), as i get following issue:

CMake Error at /home/felix/workspace/dune/opm-common-release-2017.10/cmake/Modules/OpmPackage.cmake:85 (find_package):
  Could not find a package configuration file provided by "dune-grid" with
  any of the following names:

    dune-gridConfig.cmake
    dune-grid-config.cmake

Any idea to solve this problem?
Thank you
Felix

Test failures from Zoltan.

I get test failures now:

The following tests FAILED:
      1 - distribution (Failed)
      6 - partition_iterator (Failed)
      7 - zoltan (Failed)

When running in the debugger, all failures seem to be from Zoltan_Create(), the call to MPI_Comm_rank() [line 63 of zz_struct.c the debugger claims].

I did notice something a little strange: Zoltan_Create() takes a MPI_Comm, but we pass a Dune::CollectiveCommunication<MPI_Comm>, is this correct?

I am using Open MPI on a mac, in case it matters.

compile error for zoltan_test.cpp

Hi,

I'm just trying to compile OPM from source and I've run into a hicup with opm-grid.

During compilation I get the following error. I'm wondering if this is something to do with the version of boost or zoltan I've compiled (1.69.0)?

Cheers
Tony

Scanning dependencies of target zoltan_test
[ 51%] Building CXX object CMakeFiles/zoltan_test.dir/tests/cpgrid/zoltan_test.cpp.o
/home/arh5/source/opm-grid/tests/cpgrid/zoltan_test.cpp: In function ‘int main(int, char**)’:
/home/arh5/source/opm-grid/tests/cpgrid/zoltan_test.cpp:173:38: error: invalid conversion from ‘bool (*)()’ to ‘boost::unit_test::init_unit_test_func’ {aka ‘boost::unit_test::test_suite* (*)(int, char**)’} [-fpermissive]
     boost::unit_test::unit_test_main(&init_unit_test_func,
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from /home/arh5/source/opm-grid/tests/cpgrid/zoltan_test.cpp:25:
/home/arh5/source/boost_1_69_0/boost/test/unit_test.hpp:45:57: note:   initializing argument 1 of ‘int boost::unit_test::unit_test_main(boost::unit_test::init_unit_test_func, int, char**)’
 int BOOST_TEST_DECL unit_test_main( init_unit_test_func init_func, int argc, char* argv[] );
                                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
make[2]: *** [CMakeFiles/zoltan_test.dir/tests/cpgrid/zoltan_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/zoltan_test.dir/all] Error 2
make: *** [all] Error 2

Unify access to centroids etc. in CpGrid

As just merged, #261 adds new ("Ecl") family of methods to access geometric measures computed with a different paradigm and goal from the existing methods. A problem raised in that discussion was that this is not accessible using the regular Dune grid interface, and that users are confronted with the choice of geometry at each grid call site.

A solution has been proposed to handle this by rather passing a flag upon construction to choose "method family" for geometry, storing and accessing the results in the same (standard) way afterwards.

build error on master

On my Ubuntu 16.04 laptop, I get the following build error:

and@singularius:~/src/opm-grid|master > make
[  5%] Patching Makefile to be DUNE compatible
[  5%] Built target dune-compat
[ 10%] Updating version information
[ 10%] Built target update-version
[ 15%] Building CXX object CMakeFiles/opmgrid.dir/dune/grid/cpgrid/CpGrid.cpp.o
/home/and/src/opm-grid/dune/grid/cpgrid/CpGrid.cpp: In member function ‘std::pair<bool, std::unordered_set<std::__cxx11::basic_string<char> > > Dune::CpGrid::scatterGrid(Opm::EclipseStateConstPtr, const double*, int)’:
/home/and/src/opm-grid/dune/grid/cpgrid/CpGrid.cpp:129:40: error: ‘part_and_wells’ was not declared in this scope
     return std::make_pair(true, get<1>(part_and_wells));
                                        ^
CMakeFiles/opmgrid.dir/build.make:110: recipe for target 'CMakeFiles/opmgrid.dir/dune/grid/cpgrid/CpGrid.cpp.o' failed

I've updated to the latest master branches of all OPM modules as well as and ERT and I'm using the dune packages shipped with Ubuntu. Also, I've build from scratch, i.e., this should not be caused by any artifacts of previous builds. can anybody reproduce this?

opm-grid broken?

Anyone else also see this?

153 In file included from /home/kaib/OPM-devel/debug/opm-grid/dune/grid/cpgrid/PersistentContainer.hpp:10:0,
154                  from /home/kaib/OPM-devel/debug/opm-grid/dune/grid/CpGrid.hpp:1183,
155                  from /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.hpp:25,
156                  from /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:30:
157 /home/kaib/local/dune2.3.1/release_mpi/include/dune/grid/utility/persistentcontainervector.hh: In constructor ‘Dune::PersistentContainerVector<G, IndexSet, Vector>::PersistentContainerVector(const IndexSet&, int, const Value&, const Allocator&)’:
158 /home/kaib/local/dune2.3.1/release_mpi/include/dune/grid/utility/persistentcontainervector.hh:33:7: warning: declaration of ‘indexSet’ shadows a member of 'this' [-Wshadow]
159        : codim_( codim ),
160        ^
161 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp: In function ‘void Dune::cpgrid::getNullEdgeList(void*, int, int, int, ZOLTAN_ID_PTR, ZOLTAN_ID_PTR, int*, ZOLTAN_ID_PTR, int*, int, float*, int*)’:
162 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:161:6: warning: parameter ‘err’ set but not used [-Wunused-but-set-parameter]
163  void getNullEdgeList(void *cpGridPointer, int sizeGID, int sizeLID,
164       ^
165 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp: In constructor ‘Dune::cpgrid::CombinedGridWellGraph::CombinedGridWellGraph(const Dune::CpGrid&, Opm::EclipseStateConstPtr, const double*, bool)’:
166 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:17: error: ‘WellConstPtr’ is not a member of ‘Opm’
167      std::vector<Opm::WellConstPtr> wells  = eclipseState->getSchedule()->getWells();
168                  ^
169 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:17: error: ‘WellConstPtr’ is not a member of ‘Opm’
170 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:34: error: template argument 1 is invalid
171      std::vector<Opm::WellConstPtr> wells  = eclipseState->getSchedule()->getWells();
172                                   ^
173 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:34: error: template argument 2 is invalid
174 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:43: error: invalid type in declaration before ‘=’ token
175      std::vector<Opm::WellConstPtr> wells  = eclipseState->getSchedule()->getWells();
176                                            ^
177 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:348:83: error: cannot convert ‘std::vector<const Opm::Well*>’ to ‘int’ in initialization
178      std::vector<Opm::WellConstPtr> wells  = eclipseState->getSchedule()->getWells();
179                                                                                    ^
180 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:356:31: error: request for member ‘begin’ in ‘wells’, which is of non-class type ‘int’
181      for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
182                                ^
183 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:356:58: error: request for member ‘end’ in ‘wells’, which is of non-class type ‘int’
184      for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
185                                                           ^
186 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:357:9: error: ‘WellConstPtr’ is not a member of ‘Opm’
187          Opm::WellConstPtr well = (*wellIter);
188          ^
189 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:357:27: error: expected ‘;’ before ‘well’
190          Opm::WellConstPtr well = (*wellIter);
191                            ^
192 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:359:52: error: ‘well’ was not declared in this scope
193          Opm::CompletionSetConstPtr completionSet = well->getCompletions(last_time_step);
194                                                     ^
195 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp: In member function ‘void Dune::cpgrid::CombinedGridWellGraph::postProcessPartitioningForWells(std::vector<int>&)’:
196 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:17: error: ‘WellConstPtr’ is not a member of ‘Opm’
197      std::vector<Opm::WellConstPtr> wells  = eclipseState_->getSchedule()->getWells();
198                  ^
199 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:17: error: ‘WellConstPtr’ is not a member of ‘Opm’
200 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:34: error: template argument 1 is invalid
201      std::vector<Opm::WellConstPtr> wells  = eclipseState_->getSchedule()->getWells();
202                                   ^
203 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:34: error: template argument 2 is invalid
204 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:43: error: invalid type in declaration before ‘=’ token
205      std::vector<Opm::WellConstPtr> wells  = eclipseState_->getSchedule()->getWells();
206                                            ^
207 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:385:84: error: cannot convert ‘std::vector<const Opm::Well*>’ to ‘int’ in initialization
208      std::vector<Opm::WellConstPtr> wells  = eclipseState_->getSchedule()->getWells();
209                                                                                     ^
210 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:395:31: error: request for member ‘begin’ in ‘wells’, which is of non-class type ‘int’
211      for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
212                                ^
213 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:395:58: error: request for member ‘end’ in ‘wells’, which is of non-class type ‘int’
214      for (auto wellIter= wells.begin(); wellIter != wells.end(); ++wellIter) {
215                                                           ^
216 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:396:9: error: ‘WellConstPtr’ is not a member of ‘Opm’
217          Opm::WellConstPtr well = (*wellIter);
218          ^
219 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:396:27: error: expected ‘;’ before ‘well’
220          Opm::WellConstPtr well = (*wellIter);
221                            ^
222 /home/kaib/OPM-devel/debug/opm-grid/dune/grid/common/ZoltanGraphFunctions.cpp:398:52: error: ‘well’ was not declared in this scope

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.