openmp changes to allow projection matrix parallelisation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
At present, for SPECTUB there is a problem that when doing forward projection, gradient calculations etc, the code wants to use multi-threading, but the SPECTUB matrix cannot (unless all views are cached, but it is then still very ineffective).
On the other hand, the matrix calculation itself could be parallelisable.
One way to achieve this would be to
-
create an extra CMake variable,
STIR_OPENMP_PROJECTIONS(set by default toSTIR_OPENMP), change the code indistributable.cxx,ForwardProjectorByBin.cxxetc to use that variable, such that it can be disabled, while still using OPENMP in the rest of the code. -
create another variable
STIR_OPENMP_MATRIX(set by default tofalse) that enables then any projector parallelisations.
Another advantage of this would be that it would enable MPI/GPU and OPENMP to be used together.
CMake variables would need to be set in src/CMakeLists.txt and cmake/STIRConfig.h.in
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/CMakeLists.txt and cmake/STIRConfig.h.in to trace how STIR_OPENMP is configured, then inspect distributable.cxx and ForwardProjectorByBin.cxx. Done means projection OpenMP can be disabled independently, matrix parallelisation can be enabled separately, and the requested defaults support combining MPI, GPU and OpenMP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, hpc, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100