Ctest error after building preCICE v3.0.0

  • preCICE version v3.0.0
  • Operating system or platform :“Ubuntu 20.04”
  • Installation method: building with CMake

I ran the ctest after building preCICE v3.0.0, I found some tests went wrong:

The following tests FAILED:
	  1 - precice.acceleration (Failed)
	  3 - precice.com (Failed)
	  4 - precice.cplscheme (Failed)
	  5 - precice.io (Failed)
	  6 - precice.m2n (Failed)
	  7 - precice.mapping (Failed)
	  8 - precice.mapping.petrbf (Failed)
	 11 - precice.partition (Failed)
	 12 - precice.interface (Failed)
	 14 - precice.testing (Failed)
	 16 - precice.utils (Failed)
	 18 - precice.integration.GeometricMultiscale (Failed)
	 19 - precice.integration.Parallel (Failed)
	 20 - precice.integration.QuasiNewton (Failed)
	 21 - precice.integration.Serial (Failed)

There is a common error in these test:

std::runtime_error: This test requests 4 ranks, but there are only 1 available

I tried to ignore the test error, and continued installing, test_install, nothing went wrong.
But in preCICE v2.5.1, all the tests pass well, so I don’t know where goes wrong in v3.0.0.

p.s. Some output in cmake step:

-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX11_N2071_N2072
-- Performing Test CXX11_N2071_N2072 - Success
-- Performing Test CXX17_TRANSFORM_REDUCE
-- Performing Test CXX17_TRANSFORM_REDUCE - Success
-- === CONFIGURATION ===
-- Library version to build: 3.0.0
-- Build configuration: Release
-- Build shared libraries: ON
-- Target system: Linux-5.15.0-91-generic
-- Host system: Linux-5.15.0-91-generic
-- Library architecture: x86_64-linux-gnu
-- CXX compiler: /usr/bin/c++
-- CXX compiler flags: <empty>
-- CXX linker: /usr/bin/ld
-- Install prefix: /home/charlie/software/precice_3.0.0
-- Source directory: /home/charlie/Downloads/precice-3.0.0
-- Binary directory: /home/charlie/Downloads/precice-3.0.0/build
-- Configure package generation: ON
-- Additional CTest MPI Flags: <empty>

-- === DEPENDENCIES ===
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71.0") found components: filesystem log log_setup program_options system thread unit_test_framework 
-- Found Boost 1.71.0
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.3.7") 
-- Found Eigen 3.3.7
-- Validating Eigen
-- Validating Eigen - success
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.10") 
-- Found LibXml2 2.9.10
-- Validating LibXml2
-- Validating LibXml2 - success
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- MPI Version: Open MPI v4.0.3, package: Debian OpenMPI, ident: 4.0.3, repo rev: v4.0.3, Mar 03, 2020
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'PETSc>=3.12'
--   Found PETSc, version 3.12.4
-- Found PETSc: TRUE (found suitable version "3.12.4", minimum required is "3.12") 
-- Found PETSc 3.12.4
-- Ginkgo support disabled
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter 
-- Found Python 3.8.10
-- Found Python3: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version "3.8.10") found components: Development NumPy Interpreter 
-- Found Python 3.8.10 with NumPy 1.17.4
-- Validating LibPython
-- Validating LibPython - success
-- Validating NumPy
-- Validating NumPy - success

-- === TARGETS & PACKAGES ===
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Including test sources
-- Compressing manpage: /home/charlie/Downloads/precice-3.0.0/build/packaging/man1/precice-tools.1
-- Debian package generator disabled: Install prefix is not "/usr"
-- Compressing changelog

-- === TESTS ===
-- Looking for a C compiler
-- Looking for a C compiler - /usr/bin/cc
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - /usr/bin/f95
-- Test precice.acceleration
-- Test precice.action
-- Test precice.com
-- Test precice.com.mpiports - skipped (OpenMPI)
-- Test precice.cplscheme
-- Test precice.io
-- Test precice.m2n
-- Test precice.m2n.mpiports - skipped (OpenMPI)
-- Test precice.mapping
-- Test precice.mapping.petrbf
-- Test precice.mapping.ginkgo.reference - skipped
-- Test precice.mapping.ginkgo.openmp - skipped
-- Test precice.mapping.ginkgo.cuda - skipped
-- Test precice.mapping.ginkgo.cuSolver - skipped
-- Test precice.mapping.ginkgo.hip - skipped
-- Test precice.mapping.ginkgo.hipSolver - skipped
-- Test precice.math
-- Test precice.mesh
-- Test precice.partition
-- Test precice.interface
-- Test precice.query
-- Test precice.testing
-- Test precice.time
-- Test precice.utils
-- Test precice.xml
-- Test precice.integration.GeometricMultiscale
-- Test precice.integration.Parallel
-- Test precice.integration.QuasiNewton
-- Test precice.integration.Serial
-- Test precice.solverdummy.build.cpp
-- Test precice.solverdummy.build.c
-- Test precice.solverdummy.build.fortran
-- Test precice.solverdummy.run.cpp-cpp
-- Test precice.solverdummy.run.c-c
-- Test precice.solverdummy.run.fortran-fortran
-- Test precice.solverdummy.run.cpp-c
-- Test precice.solverdummy.run.cpp-fortran
-- Test precice.solverdummy.run.c-fortran
-- Test precice.tools.noarg
-- Test precice.tools.invalidcmd
-- Test precice.tools.version
-- Test precice.tools.versionopt
-- Test precice.tools.markdown
-- Test precice.tools.xml
-- Test precice.tools.dtd
-- Test precice.tools.check.file
-- Test precice.tools.check.file+name
-- Test precice.tools.check.file+name+size
-- Test precice.tools.profiling.from-common-dir
-- Test precice.tools.profiling.one-parallel-solver
-- Test precice.tools.profiling.one-parallel-solver-different-ids
-- Test precice.tools.profiling.one-serial-damaged
-- Test precice.tools.profiling.one-serial-solver
-- Test precice.tools.profiling.one-solver-multiple-runs
-- Test precice.tools.profiling.two-mixed-solvers
-- Test precice.tools.profiling.two-parallel-solvers
-- Test precice.tools.profiling.two-serial-solvers
-- Test precice.tools.profiling.from-solver-dirs
-- Configuring done
-- Generating done
-- Build files have been written to: /home/charlie/Downloads/precice-3.0.0/build

Hi there,

There are many reasons why these tests could fail. Could you run ctest -VV -R precice.acceleration and share the result?

The error means that the test executable wasn’t started with 4 MPI ranks, which the registered tests in CMake do. Did you manually run the testprecice executable? Not starting it with MPI on 4 ranks will always result in this error.

You can see what CTest runs by having a look at the CTestTestfile.cmake in the binary directory.
Registered tests should look like this:

add_test(precice.acceleration "/usr/bin/mpiexec" "-n" "4" "/.../build/testprecice" "--run_test=AccelerationTests")

Hi fsimonis,

I ran ctest -VV -R precice.acceleration, the result shows as follow:

UpdateCTestConfiguration  from :/home/charlie/Downloads/precice-3.0.0/build/DartConfiguration.tcl
UpdateCTestConfiguration  from :/home/charlie/Downloads/precice-3.0.0/build/DartConfiguration.tcl
Test project /home/charlie/Downloads/precice-3.0.0/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: precice.acceleration

1: Test command: /home/charlie/Downloads/ParaView-5.9.1-MPI-Linux-Python3.8-64bit/bin/mpiexec "-n" "4" "/home/charlie/Downloads/precice-3.0.0/build/testprecice" "--run_test=AccelerationTests"
1: Environment variables: 
1:  OMPI_MCA_rmaps_base_oversubscribe=1
1:  OMP_NUM_THREADS=2
1: Test timeout computed to be: 20
1: Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyThis test suite runs on rank 0 of 1
1: Running 22 test cases...
1: Setup up logging
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNILSppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(43): last checkpoint: "testVIQNILSppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(274): last checkpoint: "testVIQNIMVJppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testIMVJ_effUpdate_ppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(559): last checkpoint: "testIMVJ_effUpdate_ppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testColumnsLoggingWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(1040): last checkpoint: "testColumnsLoggingWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParVectorOperations": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(47): last checkpoint: "ParVectorOperations" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParallelMatrixMatrixOp": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(152): last checkpoint: "ParallelMatrixMatrixOp" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ResPreconditionerTests/testParallelMatrixScaling": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/PreconditionerTest.cpp(260): last checkpoint: "testParallelMatrixScaling" test entry
1: This test suite runs on rank 0 of 1
1: Running 22 test cases...
1: Setup up logging
1: This test suite runs on rank 0 of 1
1: Running 22 test cases...
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNILSppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(43): last checkpoint: "testVIQNILSppWithoutSubsteps" test entry
1: Setup up logging
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(274): last checkpoint: "testVIQNIMVJppWithoutSubsteps" test entry
1: 
1: *** 7 failures are detected in the test module "preCICE Tests"unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testIMVJ_effUpdate_ppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(559): last checkpoint: "testIMVJ_effUpdate_ppWithoutSubsteps" test entry
1: 
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testColumnsLoggingWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(1040): last checkpoint: "testColumnsLoggingWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNILSppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(43): last checkpoint: "testVIQNILSppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(274): last checkpoint: "testVIQNIMVJppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testIMVJ_effUpdate_ppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(559): last checkpoint: "testIMVJ_effUpdate_ppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testColumnsLoggingWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(1040): last checkpoint: "testColumnsLoggingWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParVectorOperations": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(47): last checkpoint: "ParVectorOperations" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParallelMatrixMatrixOp": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(152): last checkpoint: "ParallelMatrixMatrixOp" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParVectorOperations": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(47): last checkpoint: "ParVectorOperations" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParallelMatrixMatrixOp": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(152): last checkpoint: "ParallelMatrixMatrixOp" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ResPreconditionerTests/testParallelMatrixScaling": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/PreconditionerTest.cpp(260): last checkpoint: "testParallelMatrixScaling" test entry
1: This test suite runs on rank 0 of 1
1: Running 22 test cases...
1: Setup up logging
1: unknown location(0): fatal error: in "AccelerationTests/ResPreconditionerTests/testParallelMatrixScaling": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/PreconditionerTest.cpp(260): last checkpoint: "testParallelMatrixScaling" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNILSppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(43): last checkpoint: "testVIQNILSppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testVIQNIMVJppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(274): last checkpoint: "testVIQNIMVJppWithoutSubsteps" test entry
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testIMVJ_effUpdate_ppWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(559): last checkpoint: "testIMVJ_effUpdate_ppWithoutSubsteps" test entry
1: 
1: *** 7 failures are detected in the test module "preCICE Tests"
1: unknown location(0): fatal error: in "AccelerationTests/AccelerationIntraCommTests/testColumnsLoggingWithoutSubsteps": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/AccelerationIntraCommTest.cpp(1040): last checkpoint: "testColumnsLoggingWithoutSubsteps" test entry
1: 
1: *** 7 failures are detected in the test module "preCICE Tests"
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParVectorOperations": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(47): last checkpoint: "ParVectorOperations" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ParallelMatrixOperationsTests/ParallelMatrixMatrixOp": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/ParallelMatrixOperationsTest.cpp(152): last checkpoint: "ParallelMatrixMatrixOp" test entry
1: unknown location(0): fatal error: in "AccelerationTests/ResPreconditionerTests/testParallelMatrixScaling": std::runtime_error: This test requests 4 ranks, but there are only 1 available
1: /home/charlie/Downloads/precice-3.0.0/src/acceleration/test/PreconditionerTest.cpp(260): last checkpoint: "testParallelMatrixScaling" test entry
1: 
1: *** 7 failures are detected in the test module "preCICE Tests"
1: 
1/1 Test #1: precice.acceleration .............***Failed    0.35 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.35 sec

The following tests FAILED:
	  1 - precice.acceleration (Failed)
Errors while running CTest

And I manually run the mpirun -np 4 ./testprecice, the outputs are as follow:

Invalid MIT-MAGIC-COOKIE-1 keyThis test suite runs on rank 1 of 4
This test suite runs on rank 0 of 4
This test suite runs on rank 2 of 4
This test suite runs on rank 3 of 4
Running 910 test cases...
Setup up logging
Running 910 test cases...
Setup up logging
Running 910 test cases...
Running 910 test cases...
Setup up logging
Setup up logging
--------------------------------------------------------------------------
A request has timed out and will therefore fail:

  Operation:  LOOKUP: orted/pmix/pmix_server_pub.c:345

Your job may terminate as a result of this problem. You may want to
adjust the MCA parameter pmix_server_max_wait and try again. If this
occurred during a connect/accept operation, you can adjust that time
using the pmix_base_exchange_timeout parameter.
--------------------------------------------------------------------------
[Charlie:859101] *** An error occurred in MPI_Comm_connect
[Charlie:859101] *** reported by process [793182209,1]
[Charlie:859101] *** on communicator MPI_COMM_SELF
[Charlie:859101] *** MPI_ERR_UNKNOWN: unknown error
[Charlie:859101] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[Charlie:859101] ***    and potentially your MPI job)
[Charlie:859094] 1 more process has sent help message help-orted.txt / timedout
[Charlie:859094] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
[Charlie:859094] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal

HI fsimonis,

I think I find where the problem is, I notice that in the output of ctest -VV -R precice.acceleration, the test command is:Test command: /home/charlie/Downloads/ParaView-5.9.1-MPI-Linux-Python3.8-64bit/bin/mpiexec "-n" "4" "/home/charlie/Downloads/precice-3.0.0/build/testprecice" "--run_test=AccelerationTests", mpiexec is executed in the wrong place, I think it is because I put the paraview path before the /usr/bin/.

And I adjust the $PATH, all tests pass well.
Thank you for your help! ctest -VV -R precice.acceleration command explains everything~

1 Like

This means that CMake detected, used and links against the MPI that ships with Paraview.
If you run into further problems, have a look at the FindMPI documentation to see how you can steer CMake to finding the correct MPI installation.

OK! Thank you for your help~ :grin:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.