New feature: re-architecture #400
TysonRayJones
announced in
Announcements
Replies: 1 comment
-
Implemented since deb68f9 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
contributor: Tyson Jones
release: v4
The entire QuEST backend has been re-architectured to be more modular, contain less code-duplication, contain less boilerplate, improve the defensive design, and enable a variety of new facilities. This involves multiple changes
The entire backend is now compiled in
C++11
, but the API remainsC99
orC++11
agnosticThe QuEST file structure has been more modularised, via a compromise of linux kernel convention and this proposal. Code is semantically grouped into small files. E.g.
qureg.h
declares only theQureg
API,environment.h
declares only theQuESTEnv
functions,communication.cpp
handles all MPI communication, etc. Internally-public funtions in these files are prefixed withqureg_
,env_
,comm_
, etc (though these may be refactored toC++
namespaces:qureg::
etc). Code containing compiler-specific pragmas (always in guards; see next item) are isolated in separate folders (gpu/
,omp/
,mpi/
).The backend-specific source files (
gpu.cpp
et al,cpu.cpp
andcommunication.cpp
) can always be compiled by generic (non-accelerated) compilers, which simply disables their backend facilities using pre-compiler guards.Source code separates data communication and the subsequent data processing logic, as per the distributed manuscript
Communication code run-time checks for CUDA-aware (or ROCm-aware) MPI (and compatible GPUs), otherwise falls back to routing GPU memory through CPU before communication.
Beta Was this translation helpful? Give feedback.
All reactions