Skip to content
Snippets Groups Projects

[cmake] disable all parallel tests when MPI wasn't found

Closed Felix Gruber requested to merge bugfix/disable-parallel-tests-without-MPI into master

When CMake didn't find MPI, all unit tests using MPI should be disabled to prevent them from failing to compile.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Hmm, I (or was it my HiWi?) noticed this too some time back when we were compiling without MPI.

    Not sure whether this is the correct fix though: selection.hh looks like it provides fallbacks when MPI isn't there, those fallbacks should be tested, too. The other header from parallel/ included by selectiontest.cc is remoteindices.hh but as far as I can tell nothing from that header is actually used in selectiontest.cc, so why should it be needed?

    Do you by chance have the actual compilation error?

  • Here's the complete output from GCC when compiling selectiontest without MPI:

    [ 11%] Building CXX object dune/common/parallel/test/CMakeFiles/selectiontest.dir/selectiontest.cc.o
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc: In function ‘void test()’:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:49:30: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
       Dune::ParallelIndexSet<int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE> distIndexSet;
                                  ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:49:30: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:49:64: error: template argument 2 is invalid
       Dune::ParallelIndexSet<int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE> distIndexSet;
                                                                    ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:49:65: error: expected unqualified-id before ‘,’ token
       Dune::ParallelIndexSet<int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE> distIndexSet;
                                                                     ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:49:72: error: expected initializer before ‘>’ token
     une::ParallelIndexSet<int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE> distIndexSet;
                                                                         ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:51:3: error: ‘distIndexSet’ was not declared in this scope
       distIndexSet.beginResize();
       ^~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:59:27: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
           distIndexSet.add(i, Dune::ParallelLocalIndex<GridFlags> (i, flag, true));
                               ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:59:61: error: expected primary-expression before ‘>’ token
           distIndexSet.add(i, Dune::ParallelLocalIndex<GridFlags> (i, flag, true));
                                                                 ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:64:63: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
       Dune::UncachedSelection<Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                   ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:64:63: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:64:97: error: wrong number of template arguments (3, should be 4)
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                           ^
    In file included from /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:8:0:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/selection.hh:94:9: note: provided for ‘template<class TS, class TG, class TL, int N> class Dune::UncachedSelection’
       class UncachedSelection
             ^~~~~~~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:64:98: error: expected unqualified-id before ‘,’ token
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                            ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:64:105: error: expected initializer before ‘>’ token
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                                   ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:67:55: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
       Dune::Selection<Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                           ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:67:55: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:67:89: error: wrong number of template arguments (3, should be 4)
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                           ^
    In file included from /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:8:0:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/selection.hh:175:9: note: provided for ‘template<class TS, class TG, class TL, int N> class Dune::Selection’
       class Selection
             ^~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:67:90: error: expected unqualified-id before ‘,’ token
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                            ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:67:97: error: expected initializer before ‘>’ token
     Dune::EnumItem<GridFlags,owner>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                                   ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:70:65: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
       Dune::UncachedSelection<Dune::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                     ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:70:65: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:70:99: error: wrong number of template arguments (3, should be 4)
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                           ^
    In file included from /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:8:0:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/selection.hh:94:9: note: provided for ‘template<class TS, class TG, class TL, int N> class Dune::UncachedSelection’
       class UncachedSelection
             ^~~~~~~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:70:100: error: expected unqualified-id before ‘,’ token
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                            ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:70:107: error: expected initializer before ‘>’ token
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                                   ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:73:57: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
       Dune::Selection<Dune::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                             ^~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:73:57: error: ‘ParallelLocalIndex’ is not a member of ‘Dune’
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:73:91: error: wrong number of template arguments (3, should be 4)
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                           ^
    In file included from /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:8:0:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/selection.hh:175:9: note: provided for ‘template<class TS, class TG, class TL, int N> class Dune::Selection’
       class Selection
             ^~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:73:92: error: expected unqualified-id before ‘,’ token
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                            ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:73:99: error: expected initializer before ‘>’ token
     ne::EnumItem<GridFlags,overlap>,int,Dune::ParallelLocalIndex<GridFlags>,ALSIZE>
                                                                                   ^
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:79:19: error: ‘ownerUncached’ was not declared in this scope
       count+=meassure(ownerUncached);
                       ^~~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:81:19: error: ‘ownerCached’ was not declared in this scope
       count+=meassure(ownerCached);
                       ^~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:83:19: error: ‘overlapUncached’ was not declared in this scope
       count+=meassure(overlapUncached);
                       ^~~~~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:85:19: error: ‘overlapCached’ was not declared in this scope
       count+=meassure(overlapCached);
                       ^~~~~~~~~~~~~
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc: In instantiation of ‘void test() [with int SIZE = 1000]’:
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:91:14:   required from here
    /home/data/gruber/src/dune-git/dune-common/dune/common/parallel/test/selectiontest.cc:47:13: warning: unused variable ‘ALSIZE’ [-Wunused-variable]
       const int ALSIZE=55;
                 ^~~~~~
  • This looks to me like selectiontest.cc should include plocalindex.hh, not remoteindices.hh

  • Let me try that...

  • Jö Fahlke mentioned in commit a5dc5ec0

    mentioned in commit a5dc5ec0

  • Jö Fahlke mentioned in merge request !373 (merged)

    mentioned in merge request !373 (merged)

  • closed

  • This merge request has been superseded by !373 (merged).

Please register or sign in to reply
Loading