ls1-MarDyn is a massively parallel Molecular Dynamics (MD) code for large systems. Its main target is the simulation of thermodynamics and nanofluidics. ls1-MarDyn is designed with a focus on performance and easy extensibility.
Currently, in src/CMakeLists.txt we have the following code:
# if mpi is not enabled, remove the unneeded source files
if(NOT ENABLE_MPI)
# duplicate the list
set(MY_SRC_BACK ${MY_SRC})
# exclude everything from parallel
list(FILTER MY_SRC EXCLUDE REGEX "/parallel/")
# but include DomainDecompBase* and LoadCalc*
list(FILTER MY_SRC_BACK INCLUDE REGEX "/parallel/")
list(FILTER MY_SRC_BACK INCLUDE REGEX "DomainDecompBase|LoadCalc|Zonal|ForceHelper")
list(APPEND MY_SRC ${MY_SRC_BACK})
This exclude/include with regex is not intuitive, error-prone and will get worse as more features are added. This can (and should) be mitigated with a better folder structure.
Currently, in
src/CMakeLists.txt
we have the following code:This exclude/include with regex is not intuitive, error-prone and will get worse as more features are added. This can (and should) be mitigated with a better folder structure.