Skip to content

Feature / Application Context#666

Open
chaoos wants to merge 19 commits intomasterfrom
feature/app_context
Open

Feature / Application Context#666
chaoos wants to merge 19 commits intomasterfrom
feature/app_context

Conversation

@chaoos
Copy link
Contributor

@chaoos chaoos commented Feb 25, 2026

This PR is a preparation for developments required for an implementation of the PTBC algorithm. It replaces in the whole codebase the MPI communicator MPI_COMM_WORLD with a variable app()->mpi.comm.

It adds an application context struct that may hold information about the current application instance, such as the MPI communicator (as of now). I might be extended in the future.

There is an MPI header wrapper, such that every translation unit that does

#include <mpi.h>

will include the new header file instead. This header includes the true mpi.h header and declares some functionality:

  • app(): returns the current application context, by default mpi.comm is MPI_COMM_WORLD.
  • app()->ptbc.initialize(): (optional) initializes the application context with a certain MPI communicator.

In future developments, this may be extended with a world_comm member that is a duplicate of MPI_COMM_WORLD. With this communicator global communication can take place, while the rest of the application uses app()->mpi.comm.

This PR is based on top of cmake_support to benefit from the cmake build system. Its PR #664 has to be merged first and this branch has to be regularly rebased on cmake_support. How to:

$ git remote -v
fork    https://github.com/mtaillefumier/tmLQCD (fetch)
fork    https://github.com/mtaillefumier/tmLQCD (push)
origin  https://github.com/etmc/tmLQCD.git (fetch)
origin  https://github.com/etmc/tmLQCD.git (push)

Then:

git fetch fork
git checkout feature/app_context
git rebase fork/cmake_support

TODO:

  • pass QUDA the proper communicator
  • pass DDalphaAMG the proper communicator
  • pass QPHIx the proper communicator

Alternatively one could of course replace #include <mpi.h> with #include "mpi.h" to make the wrapping explicit. That would maybe be better ...

Mathieu Taillefumier and others added 14 commits February 7, 2026 17:58
- Moved git hash string to a c file
- Removed the CRAY keyword
- Moved tests files in separate directory
- Namespace all #ifdef varaibles TM_XXX
- Moved profile directory to the root
- updated the url info
- Add fftw
- Add option to compile the tests (OFF by default)
- QUDA_FERMIONIC_FORCES and QUDA_EXPERIMENTAL are always on
- Removed KOJAK instrumentation
- Added a custom Qphix find package file because the original one is broken
@chaoos chaoos changed the title Feature/app context Feature / Application Context Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant