Jump to: Models | Files

ThreadSafety__VC_881176209980_005

Title
A single sentence description.
Verification check of thread safety v005
Description This verification check examines whether a model called in parallel by multiple threads gives the same results as when called sequentially. A number `num_configs` (preset in the code) of configurations is generated, each containing a different number of atoms based on a randomly distorted, periodic, face-centered cubic (fcc) structure containing a random distribution of all atoms supported by the model. Configurations used for testing are provided as auxiliary files. The energy and forces for each configuration are computed in sequence. Then the calculations are repeated using Python multithreading with `num_configs` threads and the Global Interpreter Lock (GIL) released to ensure true parallelism. Each thread possesses its own copy of memory related to the calculation. The threaded calculations are repeated `num_cycles` times (preset in the code) with the configurations randomly distributed to the threads to create many varying opportunities for collisions. To pass the test, the total energy and the forces on all atoms for a given configuration obtained in all cycles must be be identical to those obtained in the sequential calculation. Failure of this verification check implies that the model is inappropriately storing information in persistent (static) memory during or between calls. Passing this verification check provides some assurance the the model is thread-safe, but it is NOT a guarantee due to the inherent randomness of race conditions in unsafe code. To be certain, the model code would need to be studied and analyzed carefully.


HISTORY:

Changes in version 005:
* Update for compatibility with kimpy 2.0.0

Changes in version 004:
* Update syntax for latest ASE calculator to release GIL
* Use context manager for ASE calculator in single-threaded stage to ensure model destroy is called (in case the model has global variables managed by its create/destroy functions that could impact thread safety)
* Minor reformatting
Disclaimer
A statement of applicability provided by the contributor, informing users of the intended use of this KIM Item.
None
Contributor Ellad B. Tadmor
Maintainer Ellad B. Tadmor
Developer Ellad B. Tadmor
Daniel S. Karls
Published on KIM 2021
How to Cite

This Verification Check is archived in OpenKIM [1-3].

[1] Tadmor EB, Karls DS. Verification check of thread safety v005. OpenKIM; 2021. doi:10.25950/cdeef2b5

[2] Tadmor EB, Elliott RS, Sethna JP, Miller RE, Becker CA. The potential of atomistic simulations and the Knowledgebase of Interatomic Models. JOM. 2011;63(7):17. doi:10.1007/s11837-011-0102-6

[3] Elliott RS, Tadmor EB. Knowledgebase of Interatomic Models (KIM) Application Programming Interface (API). OpenKIM; 2011. doi:10.25950/ff8f563a

Click here to download the above citation in BibTeX format.
Funding Not available
Short KIM ID
The unique KIM identifier code.
VC_881176209980_005
Extended KIM ID
The long form of the KIM ID including a human readable prefix (100 characters max), two underscores, and the Short KIM ID. Extended KIM IDs can only contain alpha-numeric characters (letters and digits) and underscores and must begin with a letter.
ThreadSafety__VC_881176209980_005
DOI 10.25950/cdeef2b5
https://doi.org/10.25950/cdeef2b5
https://commons.datacite.org/doi.org/10.25950/cdeef2b5
KIM Item TypeVerification Check
Properties
Properties as defined in kimspec.edn.
KIM API Version2.0
Simulator Name
The name of the simulator as defined in kimspec.edn.
ase
Programming Language(s)
The programming languages used in the code and the percentage of the code written in each one.
100.00% Python
Previous Version ThreadSafety__VC_881176209980_004


Narrow species selection:

Begin typing to select species to narrow the selection; multiple species may be selected.