Ctest failure for preCICE

Hello
I am trying to install preCICE on my windows computer using Ubuntu 20.04.3 LTS

When I try to run ctest after building preCICE, I get the following which shows that some of the tests failed.

Test project /home/mishal49/precice/precice-2.3.0
      Start  1: precice.acceleration
 1/27 Test  #1: precice.acceleration ......................***Failed    0.02 sec
      Start  2: precice.action
 2/27 Test  #2: precice.action ............................***Failed    0.00 sec
      Start  3: precice.com
 3/27 Test  #3: precice.com ...............................***Failed    0.00 sec
      Start  4: precice.cplscheme
 4/27 Test  #4: precice.cplscheme .........................***Failed    0.00 sec
      Start  5: precice.io
 5/27 Test  #5: precice.io ................................***Failed    0.00 sec
      Start  6: precice.m2n
 6/27 Test  #6: precice.m2n ...............................***Failed    0.00 sec
      Start  7: precice.mapping
 7/27 Test  #7: precice.mapping ...........................***Failed    0.00 sec
      Start  8: precice.math
 8/27 Test  #8: precice.math ..............................***Failed    0.01 sec
      Start  9: precice.mesh
 9/27 Test  #9: precice.mesh ..............................***Failed    0.00 sec
      Start 10: precice.partition
10/27 Test #10: precice.partition .........................***Failed    0.00 sec
      Start 11: precice.time
11/27 Test #11: precice.time ..............................***Failed    0.00 sec
      Start 12: precice.interface
12/27 Test #12: precice.interface .........................***Failed    0.00 sec
      Start 13: precice.serial
13/27 Test #13: precice.serial ............................***Failed    0.00 sec
      Start 14: precice.parallel
14/27 Test #14: precice.parallel ..........................***Failed    0.00 sec
      Start 15: precice.query
15/27 Test #15: precice.query .............................***Failed    0.00 sec
      Start 16: precice.testing
16/27 Test #16: precice.testing ...........................***Failed    0.00 sec
      Start 17: precice.utils
17/27 Test #17: precice.utils .............................***Failed    0.00 sec
      Start 18: precice.xml
18/27 Test #18: precice.xml ...............................***Failed    0.00 sec
      Start 19: precice.solverdummy.build.cpp
19/27 Test #19: precice.solverdummy.build.cpp .............   Passed    1.03 sec
      Start 20: precice.solverdummy.build.c
20/27 Test #20: precice.solverdummy.build.c ...............   Passed    0.44 sec
      Start 21: precice.solverdummy.build.fortran
21/27 Test #21: precice.solverdummy.build.fortran .........   Passed    0.76 sec
      Start 22: precice.solverdummy.run.cpp-cpp
22/27 Test #22: precice.solverdummy.run.cpp-cpp ...........   Passed    1.59 sec
      Start 23: precice.solverdummy.run.c-c
23/27 Test #23: precice.solverdummy.run.c-c ...............   Passed    0.37 sec
      Start 24: precice.solverdummy.run.fortran-fortran
24/27 Test #24: precice.solverdummy.run.fortran-fortran ...   Passed    0.43 sec
      Start 25: precice.solverdummy.run.cpp-c
25/27 Test #25: precice.solverdummy.run.cpp-c .............   Passed    0.43 sec
      Start 26: precice.solverdummy.run.cpp-fortran
26/27 Test #26: precice.solverdummy.run.cpp-fortran .......   Passed    0.42 sec
      Start 27: precice.solverdummy.run.c-fortran
27/27 Test #27: precice.solverdummy.run.c-fortran .........   Passed    0.44 sec

33% tests passed, 18 tests failed out of 27

Label Time Summary:
Solverdummy    =   5.92 sec*proc (9 tests)

Total Test time (real) =   6.04 sec

The following tests FAILED:
          1 - precice.acceleration (Failed)
          2 - precice.action (Failed)
          3 - precice.com (Failed)
          4 - precice.cplscheme (Failed)
          5 - precice.io (Failed)
          6 - precice.m2n (Failed)
          7 - precice.mapping (Failed)
          8 - precice.math (Failed)
          9 - precice.mesh (Failed)
         10 - precice.partition (Failed)
         11 - precice.time (Failed)
         12 - precice.interface (Failed)
         13 - precice.serial (Failed)
         14 - precice.parallel (Failed)
         15 - precice.query (Failed)
         16 - precice.testing (Failed)
         17 - precice.utils (Failed)
         18 - precice.xml (Failed)
Errors while running CTest

How would I be able to fix this?
Would appreciate y’all’s help

How do you run the tests? Simply make test?

This is definitely a false positive (meaning the testing doesn’t work, not preCICE).
Could be a problem with MPI. Can you call mpiexec?

I just typed “sudo ctest” to run the tests.

When I run mpiexec it gives me this:


mpiexec could not find anything to do.

It is possible that you forgot to specify how many processes to run via the “-np” argument.


What happens if you do make test?

It gives the same failed tests but with this in the end:

make: *** [Makefile:130: test] Error 8

Hi @mishal49,

I would not recommend to compile with sudo, this might cause issues. In addition, could you check your configured MPIEXEC_EXECUTABLE configured by cmake (e.g. by using the advanced mode of ccmake in your build directory). Sometimes, cmake picks up the wrong mpi executable so that all tests fail immediately.

Hello @DavidSCN
I am not sure I understand what you mean. Sorry, I am a little new to this.
So, when I use ccmake it gives me this:

No problem. You can just navigate to your preCICE directory and type in ccmake . (note the dot) and press t afterwards in order to inspect your configuration.

Okay. I got this:

Yes, that’s the expected output. Now you can simply scroll down to the option MPIEXEC_EXECUTABLE. It should show something like /usr/bin/mpirun and you should be able to run the given executable successfully.

I see. It gives me:
MPIEXEC_EXECUTABLE /usr/bin/mpiexec
does this mean that I should run the command mpiexec in the precice folder? I got this:

No, this looks fine. What happens if you execute ctest -VV? What is the error message?

mishal49@DESKTOP-LGSKB8J:~/precice/precice-2.3.0$ ctest -vv
Test project /home/mishal49/precice/precice-2.3.0
CMake Error: Cannot open file for write: /home/mishal49/precice/precice-2.3.0/Testing/Temporary/LastTest.log.tmp
CMake Error: : System Error: Permission denied
Problem opening file: /home/mishal49/precice/precice-2.3.0/Testing/Temporary/LastTest.log
Cannot create log file: LastTest.log
Start 1: precice.acceleration
1/27 Test #1: precice.acceleration …***Failed 1.60 sec
Start 2: precice.action
2/27 Test #2: precice.action … Passed 0.37 sec
Start 3: precice.com
3/27 Test #3: precice.com …***Failed 1.36 sec
Start 4: precice.cplscheme
4/27 Test #4: precice.cplscheme …***Failed 1.37 sec
Start 5: precice.io
5/27 Test #5: precice.io …***Failed 1.37 sec
Start 6: precice.m2n
6/27 Test #6: precice.m2n …***Failed 1.49 sec
Start 7: precice.mapping
7/27 Test #7: precice.mapping … Passed 0.48 sec
Start 8: precice.math
8/27 Test #8: precice.math … Passed 0.38 sec
Start 9: precice.mesh
9/27 Test #9: precice.mesh … Passed 0.38 sec
Start 10: precice.partition
10/27 Test #10: precice.partition …***Failed 1.35 sec
Start 11: precice.time
11/27 Test #11: precice.time … Passed 0.39 sec
Start 12: precice.interface
12/27 Test #12: precice.interface …***Failed 1.34 sec
Start 13: precice.serial
13/27 Test #13: precice.serial …***Failed 1.43 sec
Start 14: precice.parallel
14/27 Test #14: precice.parallel …***Timeout 60.06 sec
Start 15: precice.query
15/27 Test #15: precice.query … Passed 0.30 sec
Start 16: precice.testing
16/27 Test #16: precice.testing …***Failed 1.29 sec
Start 17: precice.utils
17/27 Test #17: precice.utils … Passed 0.33 sec
Start 18: precice.xml
18/27 Test #18: precice.xml … Passed 0.38 sec
Start 19: precice.solverdummy.build.cpp
19/27 Test #19: precice.solverdummy.build.cpp …***Failed 0.06 sec
Start 20: precice.solverdummy.build.c
20/27 Test #20: precice.solverdummy.build.c …***Failed 0.02 sec
Start 21: precice.solverdummy.build.fortran
21/27 Test #21: precice.solverdummy.build.fortran …***Failed 0.02 sec
Start 22: precice.solverdummy.run.cpp-cpp
Failed test dependencies: precice.solverdummy.build.cpp
22/27 Test #22: precice.solverdummy.run.cpp-cpp …***Not Run 0.00 sec
Start 23: precice.solverdummy.run.c-c
Failed test dependencies: precice.solverdummy.build.c
23/27 Test #23: precice.solverdummy.run.c-c …***Not Run 0.00 sec
Start 24: precice.solverdummy.run.fortran-fortran
Failed test dependencies: precice.solverdummy.build.fortran
24/27 Test #24: precice.solverdummy.run.fortran-fortran …***Not Run 0.00 sec
Start 25: precice.solverdummy.run.cpp-c
Failed test dependencies: precice.solverdummy.build.c
25/27 Test #25: precice.solverdummy.run.cpp-c …***Not Run 0.00 sec
Start 26: precice.solverdummy.run.cpp-fortran
Failed test dependencies: precice.solverdummy.build.fortran
26/27 Test #26: precice.solverdummy.run.cpp-fortran …***Not Run 0.00 sec
Start 27: precice.solverdummy.run.c-fortran
Failed test dependencies: precice.solverdummy.build.fortran
27/27 Test #27: precice.solverdummy.run.c-fortran …***Not Run 0.00 sec

30% tests passed, 19 tests failed out of 27

Label Time Summary:
Solverdummy = 0.10 sec*proc (9 tests)

Total Test time (real) = 75.85 sec

The following tests FAILED:
CMake Error: Cannot open file for write: /home/mishal49/precice/precice-2.3.0/Testing/Temporary/LastTestsFailed.log.tmp
CMake Error: : System Error: Permission denied
Problem opening file: /home/mishal49/precice/precice-2.3.0/Testing/Temporary/LastTestsFailed.log
Cannot create log file: LastTestsFailed.log
1 - precice.acceleration (Failed)
3 - precice.com (Failed)
4 - precice.cplscheme (Failed)
5 - precice.io (Failed)
6 - precice.m2n (Failed)
10 - precice.partition (Failed)
12 - precice.interface (Failed)
13 - precice.serial (Failed)
14 - precice.parallel (Timeout)
16 - precice.testing (Failed)
19 - precice.solverdummy.build.cpp (Failed)
20 - precice.solverdummy.build.c (Failed)
21 - precice.solverdummy.build.fortran (Failed)
22 - precice.solverdummy.run.cpp-cpp (Not Run)
23 - precice.solverdummy.run.c-c (Not Run)
24 - precice.solverdummy.run.fortran-fortran (Not Run)
25 - precice.solverdummy.run.cpp-c (Not Run)
26 - precice.solverdummy.run.cpp-fortran (Not Run)
27 - precice.solverdummy.run.c-fortran (Not Run)
Errors while running CTest

You would need to use capital Vs in order to receive more information. However, it seems you have permission problems so my best guess would be to rebuild preCICE without sudo. In theory, you could also try to run sudo ctest, but using sudo with mpirun is highly discouraged.