-
Notifications
You must be signed in to change notification settings - Fork 4
Publishing safe internal commits into public repo #87
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
Closed
Closed
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
8c71903
Enable multithreading for system.cpp (Line~ 4100)
BaoKhanhMa 1b8cffd
Adding high-resolution clock. Adapted from 1176fd45ecde950126c1d8c392…
BaoKhanhMa 0060c42
Enabling Multithreading: ISFS - Adapted from bf5a91e1ae1e345e48630a57…
BaoKhanhMa 646375f
Padding MSD - Adapted from f6130411ca27fd890fe953e4a0d590200f92bcfc
BaoKhanhMa e01bbc2
Update README.md
dssimmons 1f87c2c
Enable multithreading for MD, MSD, Van Hove, and BAF analyses: Public…
BaoKhanhMa 0644b02
Update README for public multithreading changes: Public-safe adaptati…
BaoKhanhMa e4fff85
Add padding support to bond autocorrelation function: Public-safe ada…
BaoKhanhMa 8098af3
Add padding support to mean displacement
BaoKhanhMa ecf7463
Update control handling for multithreading
BaoKhanhMa cd2bc2a
Change environment.yml to make conda use latest C/C++ compiler. Adapt…
BaoKhanhMa f9416b6
Enable multithreading for Non Gaussian Parameter and Van Hove Distinc…
BaoKhanhMa 25d947b
Create isf.md. Public-safe adaptation from 88a17cf.
BaoKhanhMa cfaebff
Update trajectory_lists.md. Adapted from c599974
BaoKhanhMa b858e50
Creates OpenMP loop parallelism for time loop in analysis_onetime.cpp…
BaoKhanhMa 1759439
Enables multithreading for Composition and Composition vs time. Adapt…
BaoKhanhMa ac194c5
Multithreading enabled for Radial Count. Adapted from 80a0f72
BaoKhanhMa 3e86b82
Update overview.md
dssimmons f452cd1
Create multithreading.md
dssimmons f40b124
Update msd.md
dssimmons 00dff24
Update overview.md
dssimmons 018760f
Update overview.md
dssimmons 2ea4f41
Enhance separate multithreading documentation in Manual
BaoKhanhMa eab3fdb
Add multithreading badge to mean displacement doc
BaoKhanhMa 207ded3
Add multithreading badge to msd_2d documentation
BaoKhanhMa c7fbb32
Add multithreading badge to ngp documentation
BaoKhanhMa 521cd11
Add multithreading badge to radial_count.md
BaoKhanhMa 55a6d4e
Update rdf.md
BaoKhanhMa 02870f7
Add multithreading badge to vhd.md
BaoKhanhMa cc7d865
Add multithreading badge to vhs documentation
BaoKhanhMa 9e8a218
Fix links and formatting in multithreading documentation
BaoKhanhMa 14ee3ed
Update multithreading.md
BaoKhanhMa 2f9992c
Fix typo in multithreading documentation
BaoKhanhMa 53556ad
Update multithreading.md
BaoKhanhMa a75cbf5
Update trajectory_bin_list.md
dssimmons 521b47d
Revert "Update overview.md"
dssimmons ce2e850
Revert "Revert "Update overview.md""
dssimmons 3e7d63f
Revert "Update trajectory_bin_list.md"
dssimmons 0f398be
Multithreading enabled for Orientational_Correlation and Neighbor_Dec…
BaoKhanhMa 39d63d0
Clean control timing after multithreading changes
BaoKhanhMa dcb7f25
Update multithreading.md
dssimmons 3b97b6f
Cherry-pick the remaining Documentation changes.
BaoKhanhMa 6a0618f
Remove sync audit CSV from public branch
BaoKhanhMa e7ccd71
Update VERSION check logic in workflow
pkawak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <h1>isf</h1> | ||
| <h2>function</h2> | ||
|
|
||
| Calculates the full intermediate scattering function of the system via the Fourier transform of the density. | ||
|
|
||
| <h2>Syntax</h2> | ||
|
|
||
| ``` | ||
| structure_factor <output file> <method> <symmetry> <plane> <timescheme> <minimum wavenumber index> <maximum wavenumber index> | ||
| <target> | ||
| <target 2> (if symmetry = asymmetric only) | ||
| ``` | ||
|
|
||
| `<method>` is either `auto` or `manual`. The `manual` functionality is not currently documented; employ auto. | ||
|
|
||
| `<symmetry>` is either `symmetric` or `asymmetric`. | ||
| If `symmetric`, the analysis calculates the structure factor between the set of particles specified in target and itself. | ||
| If `asymmetric`, then a second target must be specified, and the partial structure factor describing correlations of `<target>` with only `<target 2>` is calculated. | ||
| `<first frame>` and `<last frame>` are the indices of the limits on time spacings to be calculated. | ||
| Options for ``<plane>`` are ``xyz``, ``xy``, ``xz``, ``yz``, ``x``, ``y``, and ``z``. | ||
| This chooses which dimensions in k-space to include in the calculation of the intermediate scattering function. | ||
| ``xyz`` computes the full radial three dimensional isf, ``xy``, ``yz``, and ``xz`` calculate two-dimensional in-plane radial isf's, and ``x``, ``y``, and ``z`` compute one-dimensional isf's. | ||
| ``<max_length_scale>`` determines the longest distance which will be decomposed into inverse space. | ||
| If a distance of 0 is given, the full box size is used. | ||
| Any deviation from '0' will in general produce incorrect results for the structure factor, especially at low k. | ||
|
|
||
| `<timescheme>` determines what times to loop over. | ||
| If `timescheme` is -1, loop over all times. | ||
| If `timescheme` is zero or positive, only use one time per block, with the value setting the time index offset from the beginning of the block. | ||
| In most cases this should be set to either 0 or -1, with -1 giving improved statistical strength at the cost of much longer compute times. | ||
| The level of improvement in statistical strength will depend on the timescale for structural decorrelation in comparison to the length of a trajectory block. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <h1>AMDAT Multithreading</h1> | ||
|
|
||
| ## Overview | ||
| High-performance computing workflows can be computationally expensive, and molecular dynamics analysis is no exception. To accelerate selected analyses, AMDAT supports multithreading with OpenMP. The analyses that currently support multithreading are listed below. | ||
|
|
||
| --- | ||
| | Analysis | Description | Maximum Speedup Tested (Compared to Serial) | | ||
| |----------|-------------|------------------------| | ||
| | [`md`](mean_displacement.md) | Calculate Mean Displacement | 7x | | ||
| | [`msd`](msd.md) | Calculate Mean Square Displacement | 10x | | ||
| | [`msd_2d`](msd_2d.md) | Calculate Mean Square Displacement for two-dimensional analysis | 9x | | ||
| | [`isfs`](isfs.md) | Calculate Incoherent Scattering Function | 20x | | ||
| | [`vhs`](vhs.md) | Calculate self part of Van Hove Function | 12x | | ||
| | [`vhd`](vhd.md) | Calculate distinct part of Van Hove Function | 20x | | ||
| | `baf` | Calculate Bond Autocorrelation Function | 15x | | ||
| | [`ngp`](ngp.md) | Calculate Non Gaussian Parameter | 30x | | ||
| | [`composition`](composition.md) | Calculate Composition | 7x | | ||
| | [`rdf`](rdf.md) | Calculate Radial Distribution Function | 21x | | ||
| | [`rnf`](rnf.md) | Calculate Radial Count | 23x | | ||
|
|
||
|
|
||
| ## Inconsistency in performance between analysis | ||
|
|
||
| AMDAT is currently implemented with a highly object-oriented design and an array-of-structures (AoS) memory layout. Hence, data are organized in adjacent memory blocks, making them more prone to Cache Coherency issue. In parallel system, this conflict results in false-sharing, meaning different threads try to have writing access to one common cache line, despite aiming at independent memory location. To fix performance bottleneck, AMDAT uses padding to separate each memory location further from each other, reducing Cache Coherency conflicts. This approach, however, trades spatial locality from serial implementation for mitigated memory conflict in parallel tasks, making perfect speed-up realistically unachievable. Therefore, speed-ups are inconsistent between analyses due to the differences in how we store the data. | ||
|
|
||
| ## System Requirements | ||
|
|
||
| To use multithreading effectively in AMDAT, make sure the following requirements are met: | ||
|
|
||
| - Your system has a multi-core CPU | ||
| - The OpenMP runtime is available in your environment (This is already handled by Conda) | ||
|
|
||
| ## Analysis Requirements | ||
|
|
||
| Parallelism is introduced to reduce the runtime of time-based loops. | ||
| However, to avoid oversubscription and ensure efficient resource utilization, | ||
| the optimal number of threads is allocated can be given by: | ||
|
|
||
| $$N_{\text{threads}} = \min\left(N_{\text{iterations}},\;N_{\text{CPUs}} \right).$$ | ||
|
|
||
| where: | ||
| - $$\ N_{\text{CPUs}} \$$ is the maximum number of hardware threads (logical CPUs) available on the node. | ||
| - $$\ N_{\text{iterations}} \$$ is the number of independent time-based iterations. In AMDAT's input files, it is highlighted as shown below: | ||
|
|
||
| > system | ||
| > xyz_log | ||
| > ./testfiles/traj.xyz ./testfiles/log.lammps | ||
| > exponential **`70`** 77 1.05 0 0 .01 | ||
| > polymer 50 | ||
| > | ||
| > ... | ||
|
|
||
| ## Usage | ||
|
|
||
| Running AMDAT is very simple with conda build, because OpenMP is already preinstalled. The flag `-n` <Number_of_Threads> will allocate the desired number of parallel regions for your analysis. | ||
|
|
||
| ### Example with msd | ||
|
|
||
| ```bash | ||
| ./AMDAT -n 8 -i ./testfiles/msd.in | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| <h1>rdf</h1> | ||
|
|
||
| [](multithreading.md) | ||
|
|
||
| <h2>Function</h2> | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.0.1 | ||
| 1.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this where that skip happens? If so, we need to just edit it out. Why are we not checking when its a pull request. That doesn't make much sense to me.