OPM / opm-grid

DUNE module supporting grids in a corner-point format
http://www.opm-project.org
GNU General Public License v3.0
18 stars 78 forks source link

compiling error when trying to build for parallel running #194

Closed GitPaean closed 8 years ago

GitPaean commented 8 years ago

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                                                         ^
bska commented 8 years ago

Any clues about the following compilation error.

What version of Dune are you targeting?

GitPaean commented 8 years ago

2.3

bska commented 8 years ago

What version of Dune are you targeting?

2.3

That's strange. Lines 417--424 of grid.hh in the 2.3.1 release of dune-grid are

template <PartitionIteratorType pitype>
struct Partition
{
  typedef typename GridFamily::Traits::template Partition<pitype>::LevelGridView
  LevelGridView;
  typedef typename GridFamily::Traits::template Partition<pitype>::LeafGridView
  LeafGridView;
};

and these don't seem to agree with the error messages you're seeing. Are you absolutely positive that you don't have a straggling 2.2 version of Dune somewhere in your include path?

GitPaean commented 8 years ago

Okay. Let me check.

GitPaean commented 8 years ago

yes. My script failed in specifying the version and it downloaded a different version (probably 2.2 while I am not sure) from 2.3. Thanks.

blattms commented 8 years ago

Sounds like you want to test the parallelization. To get some speedup you need the yet not merged PR #195 and OPM/autodiff#547

GitPaean commented 8 years ago

Yes. It looks like new development PRs require to be able to handle parallel running now. Without a parallel building, it is very difficult to test that.

Yesterday, I was trying to compile the OPM under parallel mode for the first time. Some small accidents made the process not that smooth, but finally it worked out. I will try your new PR. Thanks for the great works in parallelization.