Skip to content

Testing can't run without MPI #5627

@Cstandardlib

Description

@Cstandardlib

Describe the Testing Issue

I want to do some testing without MPI.
However, there is one parallel test that can not run without MPI. Should some flag be added to ensure it will only compile when MPI is ON?

CMake Error at CMakeLists.txt:661 (add_executable):
  Target "hsolver_parak2d_test" links to target "MPI::MPI_CXX" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  source/module_hsolver/test/CMakeLists.txt:153 (AddTest)

Also, some tests do not wrap MPI-related headers and functions in __MPI macros. I'll fix them.

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Understand the testing issue described by the developer.
  • Review the specific test case, expected and actual results, and any error messages.
  • Identify the root cause of the test failure or issue.
  • If a possible solution is suggested, evaluate its feasibility and effectiveness.
  • Implement a fix for the test failure or issue, or create a new test case if needed.
  • Verify that the fix resolves the testing issue and the test case passes.
  • Review and update any relevant documentation, such as test plans or user guides.
  • Ensure the testing issue is resolved and close the ticket.
  • Share any lessons learned or best practices with the team to prevent similar issues in the future.

Metadata

Metadata

Assignees

Labels

QuestionsRaise your quesiton! We will answer it.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions