Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • SParTA/PuReMD
  • kaymakme/PuReMD
  • vermaasj/PuReMD
3 results
Show changes
Commits on Source (2)
...@@ -51,7 +51,7 @@ void Bonds( reax_system * const system, control_params * const control, ...@@ -51,7 +51,7 @@ void Bonds( reax_system * const system, control_params * const control,
int start_i, end_i; int start_i, end_i;
int type_i, type_j; int type_i, type_j;
real ebond, pow_BOs_be2, exp_be12, CEbo; real ebond, pow_BOs_be2, exp_be12, CEbo;
real gp3, gp4, gp7, gp10, gp37; real gp3, gp4, gp7, gp10;
real exphu, exphua1, exphub1, exphuov, hulpov, estriph; real exphu, exphua1, exphub1, exphuov, hulpov, estriph;
real decobdbo, decobdboua, decobdboub; real decobdbo, decobdboua, decobdboub;
single_body_parameters *sbp_i, *sbp_j; single_body_parameters *sbp_i, *sbp_j;
...@@ -64,7 +64,6 @@ void Bonds( reax_system * const system, control_params * const control, ...@@ -64,7 +64,6 @@ void Bonds( reax_system * const system, control_params * const control,
gp4 = system->reax_param.gp.l[4]; gp4 = system->reax_param.gp.l[4];
gp7 = system->reax_param.gp.l[7]; gp7 = system->reax_param.gp.l[7];
gp10 = system->reax_param.gp.l[10]; gp10 = system->reax_param.gp.l[10];
gp37 = (int) system->reax_param.gp.l[37];
for ( i = 0; i < system->n; ++i ) for ( i = 0; i < system->n; ++i )
{ {
...@@ -120,11 +119,10 @@ void Bonds( reax_system * const system, control_params * const control, ...@@ -120,11 +119,10 @@ void Bonds( reax_system * const system, control_params * const control,
/* Stabilisation terminal triple bond in C-O */ /* Stabilisation terminal triple bond in C-O */
if ( bo_ij->BO >= 1.00 ) if ( bo_ij->BO >= 1.00 )
{ {
if ( gp37 == 2 && if ( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0) && strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0)
|| (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0 || (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) ) ) && strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) )
{ {
//ba = SQR( bo_ij->BO - 2.5 ); //ba = SQR( bo_ij->BO - 2.5 );
exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) ); exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) );
......
...@@ -38,7 +38,7 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp, ...@@ -38,7 +38,7 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp,
int start_i, end_i; int start_i, end_i;
int type_i, type_j; int type_i, type_j;
real pow_BOs_be2, exp_be12, CEbo, e_bond_l; real pow_BOs_be2, exp_be12, CEbo, e_bond_l;
real gp3, gp4, gp7, gp10, gp37; real gp3, gp4, gp7, gp10;
real exphu, exphua1, exphub1, exphuov, hulpov; real exphu, exphua1, exphub1, exphuov, hulpov;
real decobdbo, decobdboua, decobdboub; real decobdbo, decobdboua, decobdboub;
single_body_parameters *sbp_i, *sbp_j; single_body_parameters *sbp_i, *sbp_j;
...@@ -60,7 +60,6 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp, ...@@ -60,7 +60,6 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp,
gp4 = gp.l[4]; gp4 = gp.l[4];
gp7 = gp.l[7]; gp7 = gp.l[7];
gp10 = gp.l[10]; gp10 = gp.l[10];
gp37 = (int) gp.l[37];
e_bond_l = 0.0; e_bond_l = 0.0;
start_i = Start_Index( i, bond_list ); start_i = Start_Index( i, bond_list );
...@@ -97,11 +96,10 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp, ...@@ -97,11 +96,10 @@ CUDA_GLOBAL void k_bonds( reax_atom *my_atoms, global_parameters gp,
/* Stabilisation terminal triple bond */ /* Stabilisation terminal triple bond */
if ( bo_ij->BO >= 1.00 ) if ( bo_ij->BO >= 1.00 )
{ {
if ( gp37 == 2 if ( (Cuda_strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
|| ( (Cuda_strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
&& Cuda_strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0) && Cuda_strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0)
|| (Cuda_strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0 || (Cuda_strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0
&& Cuda_strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) ) ) && Cuda_strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) )
{ {
//ba = SQR( bo_ij->BO - 2.5 ); //ba = SQR( bo_ij->BO - 2.5 );
exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) ); exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) );
......
...@@ -874,7 +874,7 @@ struct mpi_datatypes ...@@ -874,7 +874,7 @@ struct mpi_datatypes
* l[34] = b_s_acks2 (ACKS2 bond softness) * l[34] = b_s_acks2 (ACKS2 bond softness)
* l[35] = N/A * l[35] = N/A
* l[36] = N/A * l[36] = N/A
* l[37] = version number * l[37] = N/A
* l[38] = p_coa3 * l[38] = p_coa3
* */ * */
struct global_parameters struct global_parameters
......
...@@ -43,7 +43,7 @@ void Bonds( reax_system *system, control_params *control, ...@@ -43,7 +43,7 @@ void Bonds( reax_system *system, control_params *control,
int start_i, end_i; int start_i, end_i;
int type_i, type_j; int type_i, type_j;
real ebond, pow_BOs_be2, exp_be12, CEbo; real ebond, pow_BOs_be2, exp_be12, CEbo;
real gp3, gp4, gp7, gp10, gp37; real gp3, gp4, gp7, gp10;
real exphu, exphua1, exphub1, exphuov, hulpov, estriph; real exphu, exphua1, exphub1, exphuov, hulpov, estriph;
real decobdbo, decobdboua, decobdboub; real decobdbo, decobdboua, decobdboub;
single_body_parameters *sbp_i, *sbp_j; single_body_parameters *sbp_i, *sbp_j;
...@@ -56,7 +56,6 @@ void Bonds( reax_system *system, control_params *control, ...@@ -56,7 +56,6 @@ void Bonds( reax_system *system, control_params *control,
gp4 = system->reax_param.gp.l[4]; gp4 = system->reax_param.gp.l[4];
gp7 = system->reax_param.gp.l[7]; gp7 = system->reax_param.gp.l[7];
gp10 = system->reax_param.gp.l[10]; gp10 = system->reax_param.gp.l[10];
gp37 = (int) system->reax_param.gp.l[37];
natoms = system->n; natoms = system->n;
for ( i = 0; i < natoms; ++i ) for ( i = 0; i < natoms; ++i )
...@@ -113,11 +112,10 @@ void Bonds( reax_system *system, control_params *control, ...@@ -113,11 +112,10 @@ void Bonds( reax_system *system, control_params *control,
/* Stabilisation terminal triple bond in C-O */ /* Stabilisation terminal triple bond in C-O */
if ( bo_ij->BO >= 1.00 ) if ( bo_ij->BO >= 1.00 )
{ {
if ( gp37 == 2 && if ( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0) && strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0)
|| (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0 || (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) ) ) && strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) )
{ {
//ba = SQR( bo_ij->BO - 2.5 ); //ba = SQR( bo_ij->BO - 2.5 );
exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) ); exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) );
......
...@@ -591,7 +591,7 @@ struct mpi_datatypes ...@@ -591,7 +591,7 @@ struct mpi_datatypes
* l[34] = b_s_acks2 (ACKS2 bond softness) * l[34] = b_s_acks2 (ACKS2 bond softness)
* l[35] = N/A * l[35] = N/A
* l[36] = N/A * l[36] = N/A
* l[37] = version number * l[37] = N/A
* l[38] = p_coa3 */ * l[38] = p_coa3 */
struct global_parameters struct global_parameters
{ {
......
...@@ -6,64 +6,84 @@ ...@@ -6,64 +6,84 @@
# Introduction # Introduction
This repository contains the development version of the This repository contains the development version of the **Pu**ReMD **Re**active
[Purdue Reactive Molecular Dynamics](https://www.cs.purdue.edu/puremd) (PuReMD) project. **M**olecular **D**ynamics (PuReMD) project. PuReMD is an open-source highly
performant range-limited atomic-level molecular dynamics code which implements
the the reactive force field (ReaxFF) method coupled with a global atomic
charge model. Supported charge models include charge equilibration,
electronegativity equilization, and atom-condensed Kohn-Sham approximated to
second order.
# Build Instructions # Build Instructions
## Developer ## User
To build, the following versions of software are required: To build, the following versions of software are required:
- git - GNU make
- Autoconf v2.69+ - C compiler with support for the c11 standard or newer and optionally OpenMP v4.0+ (shared-memory code)
- Automake v1.15+ - C++ compiler with support for the c++14 standard or newer (CUDA, MPI+CUDA versions)
- OpenMP v4.0+ compliant compiler (OpenMP versions only) - MPI v2+ compliant library (MPI, MPI+CUDA versions)
- MPI v2+ compliant library (MPI versions only) - CUDA v6.0+ (CUDA, MPI+CUDA versions)
- CUDA v6.0+ (CUDA versions only) - zlib v1.2.x or newer
Instructions:
```bash ```bash
git clone https://gitlab.msu.edu/SParTA/PuReMD.git # Download release tarball
cd PuReMD tar -xvf puremd-1.0.tar.gz
git submodule init cd puremd-1.0
git submodule update
autoreconf -ivf
./configure ./configure
make make
``` ```
To build tarball releases after configuring a specific build target, run the following: By default, the shared memory version with OpenMP support will be built. For other build targets,
run ./configure --help and consult the documentation. An example of building the MPI+CUDA version
is given below.
```bash ```bash
make dist ./configure --enable-openmp=no --enable-mpi-gpu=yes
``` ```
## User ## Developer
To build, the following versions of software are required:
- git
- Autoconf v2.69 or newer
- Automake v1.15 or newer
- libtool v2.2 or newer
- GNU make
- C compiler with support for the c11 standard or newer and optionally OpenMP v4.0+ (shared-memory code)
- C++ compiler with support for the c++14 standard or newer (CUDA, MPI+CUDA versions)
- MPI v2+ compliant library (MPI, MPI+CUDA versions)
- CUDA v6.0+ (CUDA, MPI+CUDA versions)
- zlib v1.2.x or newer
Instructions:
```bash ```bash
# Download release tarball git clone https://gitlab.msu.edu/SParTA/PuReMD.git
tar -xvf puremd-1.0.tar.gz cd PuReMD
cd puremd-1.0 git submodule init
git submodule update
autoreconf -ivf
./configure ./configure
make make
``` ```
By default, the shared memory version with OpenMP support will be built. For other build targets, To build tarball releases after configuring a specific build target, run the following:
run ./configure --help and consult the documentation. An example of building the MPI+CUDA version
is given below.
```bash ```bash
./configure --enable-openmp=no --enable-mpi-gpu=yes make dist
``` ```
# References # References
Shared Memory: Shared-Memory Versions:
- [Serial](https://www.cs.purdue.edu/puremd/docs/80859.pdf) - [Serial](https://www.cs.purdue.edu/puremd/docs/80859.pdf)
- [CUDA (single GPU)](http://dx.doi.org/10.1016/j.jcp.2014.04.035) - [CUDA (single GPU)](http://dx.doi.org/10.1016/j.jcp.2014.04.035)
- [Charge Method Optimizations with OpenMP](https://doi.org/10.1109/ScalA.2016.006) - [Charge Model Optimizations with OpenMP](https://doi.org/10.1137/18M1224684)
Distributed Memory: Distributed-Memory Versions:
- [MPI (message passing interface)](https://www.cs.purdue.edu/puremd/docs/Parallel-Reactive-Molecular-Dynamics.pdf) - [MPI (message passing interface)](https://www.cs.purdue.edu/puremd/docs/Parallel-Reactive-Molecular-Dynamics.pdf)
- [Hybrid MPI+OpenMP optimization](https://doi.org/10.1177/1094342017746221)
- [Charge Model Optimizations with MPI](https://doi.org/10.1145/3330345.3330359)
- [CUDA+MPI (multi-GPU)](https://www.cs.purdue.edu/puremd/docs/pgpuremd.pdf) - [CUDA+MPI (multi-GPU)](https://www.cs.purdue.edu/puremd/docs/pgpuremd.pdf)
...@@ -30,7 +30,7 @@ void Bonds( reax_system *system, control_params *control, ...@@ -30,7 +30,7 @@ void Bonds( reax_system *system, control_params *control,
reax_list **lists, output_controls *out_control ) reax_list **lists, output_controls *out_control )
{ {
int i; int i;
real gp3, gp4, gp7, gp10, gp37, ebond_total; real gp3, gp4, gp7, gp10, ebond_total;
reax_list *bonds; reax_list *bonds;
bonds = lists[BONDS]; bonds = lists[BONDS];
...@@ -38,7 +38,6 @@ void Bonds( reax_system *system, control_params *control, ...@@ -38,7 +38,6 @@ void Bonds( reax_system *system, control_params *control,
gp4 = system->reax_param.gp.l[4]; gp4 = system->reax_param.gp.l[4];
gp7 = system->reax_param.gp.l[7]; gp7 = system->reax_param.gp.l[7];
gp10 = system->reax_param.gp.l[10]; gp10 = system->reax_param.gp.l[10];
gp37 = (int) system->reax_param.gp.l[37];
ebond_total = 0.0; ebond_total = 0.0;
#if defined(_OPENMP) #if defined(_OPENMP)
...@@ -119,11 +118,10 @@ void Bonds( reax_system *system, control_params *control, ...@@ -119,11 +118,10 @@ void Bonds( reax_system *system, control_params *control,
/* Stabilisation terminal triple bond in C-O */ /* Stabilisation terminal triple bond in C-O */
if ( bo_ij->BO >= 1.00 ) if ( bo_ij->BO >= 1.00 )
{ {
if ( gp37 == 2 && if ( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
( (strncmp( sbp_i->name, "C", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0) && strncmp( sbp_j->name, "O", sizeof(sbp_j->name) ) == 0)
|| (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0 || (strncmp( sbp_i->name, "O", sizeof(sbp_i->name) ) == 0
&& strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) ) ) && strncmp( sbp_j->name, "C", sizeof(sbp_j->name) ) == 0) )
{ {
//ba = SQR( bo_ij->BO - 2.5 ); //ba = SQR( bo_ij->BO - 2.5 );
exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) ); exphu = EXP( -gp7 * SQR(bo_ij->BO - 2.5) );
......
...@@ -503,7 +503,7 @@ typedef int (*write_function)( FILE *, const char *, ... ); ...@@ -503,7 +503,7 @@ typedef int (*write_function)( FILE *, const char *, ... );
* l[34] = b_s_acks2 (ACKS2 bond softness) * l[34] = b_s_acks2 (ACKS2 bond softness)
* l[35] = N/A * l[35] = N/A
* l[36] = N/A * l[36] = N/A
* l[37] = version number * l[37] = N/A
* l[38] = p_coa3 */ * l[38] = p_coa3 */
struct global_parameters struct global_parameters
{ {
......