Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code refactor mamico #273

Merged
merged 53 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f936f7b
sim loop separated, code working
amartyads Jul 6, 2021
4830b42
files created by example run cleared
amartyads Jul 6, 2021
b77bd60
Merge branch 'master' into code-refactor-mamico
amartyads Jul 6, 2021
6a73f39
attempt to merge
amartyads Oct 21, 2021
6c879f6
Merge branch 'ls1mardyn:master' into code-refactor-mamico
amartyads Oct 21, 2021
0a7a877
mamico plugins
amartyads Oct 21, 2021
f38e40d
Merge branch 'code-refactor-mamico' of https://github.com/amartyads/l…
amartyads Oct 21, 2021
bf71f35
put mamico plugins in def regions
amartyads Oct 21, 2021
7ce4f7c
moved timer inside loop body
amartyads Oct 25, 2021
59bd147
Working mamico coupling without dataex
amartyads Nov 15, 2021
3f880e9
code works for origin domain, some debug prints
amartyads Nov 30, 2021
1df5a19
switched off mamico thermostat, using ls1
amartyads Dec 6, 2021
c5a0823
minor updates
amartyads Jan 20, 2022
db835bb
init cellservice to nullptr
amartyads Mar 11, 2022
6b1ada9
up to date with main branch
amartyads Jun 22, 2022
fb9baa0
Merge branch 'ls1mardyn:code-refactor-mamico' into code-refactor-mamico
amartyads Jul 14, 2022
875938c
comments on pull request addressed
amartyads Jul 14, 2022
d5063f0
static cast instead of ancient technology
amartyads Jul 18, 2022
fe9f190
comment for the nullptr check
amartyads Jul 27, 2022
bf28d1f
box domain rolled back
amartyads Jul 29, 2022
a0b09ee
removed redundant include in cmake, edited comment
amartyads Jul 29, 2022
0c1b059
Mamico cell service set by direct access
amartyads Aug 10, 2022
5aab85b
added hack to circumvent gcc bug
amartyads Aug 11, 2022
fcdcd3d
removing reliance on singletons
amartyads Aug 11, 2022
80e9152
removed redundant cellserviceset check
amartyads Aug 11, 2022
42ca5e7
mpi opimization bug fixed
amartyads Aug 22, 2022
475dcdb
qol update for mamico path
amartyads Aug 24, 2022
8c6d8f8
added communicator functionality
amartyads Nov 23, 2022
cc165a8
more comm_world removal
amartyads Nov 23, 2022
e210c50
Merge branch 'master' into code-refactor-mamico
amartyads Nov 25, 2022
0f26da2
force static compilation of library
amartyads Feb 27, 2023
e3418fb
Merge pull request #203 from amartyads/code-refactor-mamico
amartyads Mar 3, 2023
13607da
Merge branch 'code-refactor-mamico' of https://github.com/amartyads/l…
amartyads May 17, 2023
8737ce1
update to merge with master
amartyads May 17, 2023
25780ce
allow mamico to set MPI grid dims
amartyads May 17, 2023
5c3bdc9
fix function name
amartyads May 19, 2023
d5cbaa6
Merge branch 'master' into code-refactor-mamico
amartyads Jun 14, 2023
c9e5efe
bugfix for repeated container updates in mamico
amartyads Aug 31, 2023
80c3633
typo
amartyads Aug 31, 2023
36569cd
Merge branch 'master' into code-refactor-mamico
amartyads Sep 5, 2023
f4d309f
documentation
amartyads Sep 5, 2023
40a87f3
Merge branch 'master' into code-refactor-mamico
amartyads Sep 5, 2023
38bee22
Update cmake/modules/mamico.cmake
amartyads Sep 6, 2023
eddfd07
Update src/Simulation.cpp
amartyads Sep 6, 2023
e085bd0
docs and indent cleanup
amartyads Sep 6, 2023
04dcdd8
minor whitespace things
amartyads Sep 6, 2023
6a76a4d
using std array
amartyads Sep 6, 2023
d3cab92
bugfix
amartyads Sep 6, 2023
17717ad
change timer to reference and neccesary updates
amartyads Sep 6, 2023
0993aee
bugfixes (segfault for globsim, bbox size)
amartyads Sep 6, 2023
9e0f340
remove unneccesary array copy
amartyads Sep 7, 2023
5b3e2d9
remove unneccesary copy
amartyads Sep 7, 2023
68f616a
moved -fPIC flag to separate variable
amartyads Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ include(ALL)
# ----- third: include autopas
include(autopas)

# ----- include mamico
include(mamico)

# ----- resilience plugin dependencies are set here
include(compression)

Expand Down
18 changes: 18 additions & 0 deletions cmake/modules/mamico.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
option(MAMICO_COUPLING "Couple with MaMiCo" OFF)
if (MAMICO_COUPLING)
message(STATUS "MaMiCo coupling enabled. ls1 mardyn will compile as library. No executable will be created.")
set(MAMICO_COMPILE_DEFINITIONS MAMICO_COUPLING MDDim3)
option(MAMICO_ENABLE_FPIC "Enable -fPIC flag for MaMiCo python bindings" OFF)
set(MAMICO_SRC_DIR CACHE PATH "Root directory of the MaMiCo codebase")
if(NOT MAMICO_SRC_DIR)
message(FATAL_ERROR "MaMiCo source directory not specified.")
endif()
if(ENABLE_MPI)
set(MAMICO_MPI_DEFINITIONS MDCoupledParallel TarchParallel)
endif()
if(MAMICO_ENABLE_FPIC)
set(MAMICO_COMPILE_OPTIONS "${MAMICO_COMPILE_OPTIONS} -fPIC")
endif()
else()
message(STATUS "MaMiCo coupling disabled.")
endif()
1 change: 1 addition & 0 deletions doc/Plugins_Summary.dox
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SP / TemperatureProfile | temperature profile output | Outputs the average tempe
SP / VirialProfile | virial pressure profile output | Outputs the virial/partial pressures in a spatial 1D output in y-direction or 2D output (Virial2DProfile). Requires/auto enables DensityProfile.
LoadbalanceWriter | print, mpi, load balance, timers | Writes load balance information. Averages, min, max and a load balance is written. For more detailed output use the TimerWriter.
LoadImbalanceThroughSleepPlugin | mpi, overlapping | Artificially introduces a load imbalance at different plugin steps. Primarily used for testing.
MamicoCoupling | coupling, compile as library | Allows the coupling code MaMiCo to couple with ls1. Requires ls1 to be compiled as library. This is automatically done when passing MAMICO_COUPLING=ON to cmake. This plugin always switches the ls1 thermostat off.
MaxCheck | limit, maximum values, overlaps, explosion | Limit velocity and force of individual particles to maximum values to avoid overlaps and consequently exploding systems.
MaxWriter | sampling, maximum values, force, velocity | Sampling maximum force and velocities values occuring in the system.
MettDeamon | particle-insertion, reservoir, replenish, stationary, evaporation | Replenish a liquid film by a particle reservoir, to attain stationary conditons in an e.g. evaporation simulation.
Expand Down
4 changes: 3 additions & 1 deletion examples/Mamico-couette/ls1configNoCP.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<mardyn version="20100525">
<loglevel>INFO</loglevel>
<refunits type="SI">
<length unit="nm">0.34</length>
<mass unit="u">39.948</mass>
Expand Down Expand Up @@ -62,7 +63,8 @@
</ensemble>
<algorithm>
<parallelisation type="DomainDecomposition"/>
<datastructure type="AutoPas">
<datastructure type="LinkedCells">
<cellsInCutoffRadius>1</cellsInCutoffRadius>
</datastructure>
<cutoffs type="CenterOfMass">
<radiusLJ unit="reduced">2.2</radiusLJ>
Expand Down
15 changes: 13 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,20 @@ else()
endif ()

# add the executable
ADD_EXECUTABLE(MarDyn
if (MAMICO_COUPLING)
ADD_LIBRARY(MarDyn STATIC
${MY_SRC}
parallel/ForceHelper.h)
)
TARGET_INCLUDE_DIRECTORIES(MarDyn SYSTEM PRIVATE "${MAMICO_SRC_DIR}")
TARGET_COMPILE_DEFINITIONS(MarDyn PUBLIC
${MAMICO_COMPILE_DEFINITIONS} ${MAMICO_MPI_DEFINITIONS}
)
TARGET_COMPILE_OPTIONS(MarDyn PUBLIC ${MAMICO_COMPILE_OPTIONS})
else()
ADD_EXECUTABLE(MarDyn
${MY_SRC}
)
endif()

# dependencies for lz4
if (ENABLE_LZ4)
Expand Down
Loading