Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
d916416c
Commit
d916416c
authored
7 years ago
by
Stan Moore
Browse files
Options
Downloads
Patches
Plain Diff
Add pair_yukawa_kokkos to Install.sh and minor cleanup
parent
5ba80662
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/KOKKOS/Install.sh
+2
-0
2 additions, 0 deletions
src/KOKKOS/Install.sh
src/KOKKOS/pair_yukawa_kokkos.cpp
+2
-28
2 additions, 28 deletions
src/KOKKOS/pair_yukawa_kokkos.cpp
src/KOKKOS/pair_yukawa_kokkos.h
+16
-16
16 additions, 16 deletions
src/KOKKOS/pair_yukawa_kokkos.h
with
20 additions
and
44 deletions
src/KOKKOS/Install.sh
+
2
−
0
View file @
d916416c
...
@@ -229,6 +229,8 @@ action pair_tersoff_mod_kokkos.cpp pair_tersoff_mod.cpp
...
@@ -229,6 +229,8 @@ action pair_tersoff_mod_kokkos.cpp pair_tersoff_mod.cpp
action pair_tersoff_mod_kokkos.h pair_tersoff_mod.h
action pair_tersoff_mod_kokkos.h pair_tersoff_mod.h
action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp
action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp
action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h
action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h
action pair_yukawa_kokkos.cpp
action pair_yukawa_kokkos.h
action pppm_kokkos.cpp pppm.cpp
action pppm_kokkos.cpp pppm.cpp
action pppm_kokkos.h pppm.h
action pppm_kokkos.h pppm.h
action rand_pool_wrap_kokkos.cpp
action rand_pool_wrap_kokkos.cpp
...
...
This diff is collapsed.
Click to expand it.
src/KOKKOS/pair_yukawa_kokkos.cpp
+
2
−
28
View file @
d916416c
...
@@ -16,15 +16,6 @@
...
@@ -16,15 +16,6 @@
------------------------------------------------------------------------- */
------------------------------------------------------------------------- */
#include
<math.h>
#include
<math.h>
#include
<stdlib.h>
#include
<stdlib.h>
// #include "pair_yukawa.h"
// #include "atom.h"
//#include "force.h"
//#include "comm.h"
//#include "neigh_list.h"
//#include "memory.h"
//#include "error.h"
// These were added.
#include
"pair_yukawa_kokkos.h"
#include
"pair_yukawa_kokkos.h"
#include
"kokkos.h"
#include
"kokkos.h"
#include
"atom_kokkos.h"
#include
"atom_kokkos.h"
...
@@ -40,7 +31,6 @@
...
@@ -40,7 +31,6 @@
#include
"memory.h"
#include
"memory.h"
#include
"error.h"
#include
"error.h"
#include
"atom_masks.h"
#include
"atom_masks.h"
// end These were added.
using
namespace
LAMMPS_NS
;
using
namespace
LAMMPS_NS
;
using
namespace
MathConst
;
using
namespace
MathConst
;
...
@@ -104,24 +94,11 @@ void PairYukawaKokkos<DeviceType>::allocate()
...
@@ -104,24 +94,11 @@ void PairYukawaKokkos<DeviceType>::allocate()
d_cutsq
=
k_cutsq
.
template
view
<
DeviceType
>();
d_cutsq
=
k_cutsq
.
template
view
<
DeviceType
>();
k_params
=
Kokkos
::
DualView
<
params_yukawa
**
,
k_params
=
Kokkos
::
DualView
<
params_yukawa
**
,
Kokkos
::
LayoutRight
,
DeviceType
>
(
Kokkos
::
LayoutRight
,
DeviceType
>
(
"PairYukawa::params"
,
n
+
1
,
n
+
1
);
"PairYukawa::params"
,
n
+
1
,
n
+
1
);
params
=
k_params
.
template
view
<
DeviceType
>();
params
=
k_params
.
template
view
<
DeviceType
>();
}
}
/* ----------------------------------------------------------------------
global settings
------------------------------------------------------------------------- */
template
<
class
DeviceType
>
void
PairYukawaKokkos
<
DeviceType
>::
settings
(
int
narg
,
char
**
arg
)
{
if
(
narg
!=
2
)
error
->
all
(
FLERR
,
"Illegal pair_style command"
);
PairYukawa
::
settings
(
2
,
arg
);
}
/* ----------------------------------------------------------------------
/* ----------------------------------------------------------------------
init specific to this pair style
init specific to this pair style
------------------------------------------------------------------------- */
------------------------------------------------------------------------- */
...
@@ -158,9 +135,6 @@ void PairYukawaKokkos<DeviceType>::init_style()
...
@@ -158,9 +135,6 @@ void PairYukawaKokkos<DeviceType>::init_style()
}
else
if
(
neighflag
==
HALF
||
neighflag
==
HALFTHREAD
)
{
}
else
if
(
neighflag
==
HALF
||
neighflag
==
HALFTHREAD
)
{
neighbor
->
requests
[
irequest
]
->
full
=
0
;
neighbor
->
requests
[
irequest
]
->
full
=
0
;
neighbor
->
requests
[
irequest
]
->
half
=
1
;
neighbor
->
requests
[
irequest
]
->
half
=
1
;
}
else
if
(
neighflag
==
N2
)
{
neighbor
->
requests
[
irequest
]
->
full
=
0
;
neighbor
->
requests
[
irequest
]
->
half
=
0
;
}
else
{
}
else
{
error
->
all
(
FLERR
,
"Cannot use chosen neighbor list style with yukawa/kk"
);
error
->
all
(
FLERR
,
"Cannot use chosen neighbor list style with yukawa/kk"
);
}
}
...
@@ -241,7 +215,7 @@ void PairYukawaKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
...
@@ -241,7 +215,7 @@ void PairYukawaKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
// loop over neighbors of my atoms
// loop over neighbors of my atoms
EV_FLOAT
ev
=
pair_compute
<
PairYukawaKokkos
<
DeviceType
>
,
void
>
(
EV_FLOAT
ev
=
pair_compute
<
PairYukawaKokkos
<
DeviceType
>
,
void
>
(
this
,(
NeighListKokkos
<
DeviceType
>*
)
list
);
this
,(
NeighListKokkos
<
DeviceType
>*
)
list
);
if
(
eflag_global
)
eng_vdwl
+=
ev
.
evdwl
;
if
(
eflag_global
)
eng_vdwl
+=
ev
.
evdwl
;
if
(
vflag_global
)
{
if
(
vflag_global
)
{
...
...
This diff is collapsed.
Click to expand it.
src/KOKKOS/pair_yukawa_kokkos.h
+
16
−
16
View file @
d916416c
...
@@ -31,15 +31,15 @@ namespace LAMMPS_NS {
...
@@ -31,15 +31,15 @@ namespace LAMMPS_NS {
template
<
class
DeviceType
>
template
<
class
DeviceType
>
class
PairYukawaKokkos
:
public
PairYukawa
{
class
PairYukawaKokkos
:
public
PairYukawa
{
public:
public:
enum
{
EnabledNeighFlags
=
FULL
|
HALFTHREAD
|
HALF
|
N2
};
enum
{
EnabledNeighFlags
=
FULL
|
HALFTHREAD
|
HALF
};
enum
{
COUL_FLAG
=
0
};
enum
{
COUL_FLAG
=
0
};
typedef
DeviceType
device_type
;
typedef
DeviceType
device_type
;
typedef
ArrayTypes
<
DeviceType
>
AT
;
PairYukawaKokkos
(
class
LAMMPS
*
);
PairYukawaKokkos
(
class
LAMMPS
*
);
virtual
~
PairYukawaKokkos
();
virtual
~
PairYukawaKokkos
();
void
compute
(
int
,
int
);
void
compute
(
int
,
int
);
void
settings
(
int
,
char
**
);
void
init_style
();
void
init_style
();
double
init_one
(
int
,
int
);
double
init_one
(
int
,
int
);
...
@@ -78,22 +78,22 @@ class PairYukawaKokkos : public PairYukawa {
...
@@ -78,22 +78,22 @@ class PairYukawaKokkos : public PairYukawa {
typename
Kokkos
::
DualView
<
params_yukawa
**
,
Kokkos
::
LayoutRight
,
DeviceType
>::
t_dev_const_um
params
;
typename
Kokkos
::
DualView
<
params_yukawa
**
,
Kokkos
::
LayoutRight
,
DeviceType
>::
t_dev_const_um
params
;
params_yukawa
m_params
[
MAX_TYPES_STACKPARAMS
+
1
][
MAX_TYPES_STACKPARAMS
+
1
];
params_yukawa
m_params
[
MAX_TYPES_STACKPARAMS
+
1
][
MAX_TYPES_STACKPARAMS
+
1
];
F_FLOAT
m_cutsq
[
MAX_TYPES_STACKPARAMS
+
1
][
MAX_TYPES_STACKPARAMS
+
1
];
F_FLOAT
m_cutsq
[
MAX_TYPES_STACKPARAMS
+
1
][
MAX_TYPES_STACKPARAMS
+
1
];
typename
A
rrayTypes
<
DeviceType
>
::
t_x_array_randomread
x
;
typename
A
T
::
t_x_array_randomread
x
;
typename
A
rrayTypes
<
DeviceType
>
::
t_x_array
c_x
;
typename
A
T
::
t_x_array
c_x
;
typename
A
rrayTypes
<
DeviceType
>
::
t_f_array
f
;
typename
A
T
::
t_f_array
f
;
typename
A
rrayTypes
<
DeviceType
>
::
t_int_1d_randomread
type
;
typename
A
T
::
t_int_1d_randomread
type
;
DAT
::
tdual_efloat_1d
k_eatom
;
DAT
::
tdual_efloat_1d
k_eatom
;
DAT
::
tdual_virial_array
k_vatom
;
DAT
::
tdual_virial_array
k_vatom
;
typename
A
rrayTypes
<
DeviceType
>
::
t_efloat_1d
d_eatom
;
typename
A
T
::
t_efloat_1d
d_eatom
;
typename
A
rrayTypes
<
DeviceType
>
::
t_virial_array
d_vatom
;
typename
A
T
::
t_virial_array
d_vatom
;
typename
A
rrayTypes
<
DeviceType
>
::
t_tagint_1d
tag
;
typename
A
T
::
t_tagint_1d
tag
;
int
newton_pair
;
int
newton_pair
;
double
special_lj
[
4
];
double
special_lj
[
4
];
typename
A
rrayTypes
<
DeviceType
>
::
tdual_ffloat_2d
k_cutsq
;
typename
A
T
::
tdual_ffloat_2d
k_cutsq
;
typename
A
rrayTypes
<
DeviceType
>
::
t_ffloat_2d
d_cutsq
;
typename
A
T
::
t_ffloat_2d
d_cutsq
;
int
neighflag
;
int
neighflag
;
...
@@ -109,15 +109,15 @@ class PairYukawaKokkos : public PairYukawa {
...
@@ -109,15 +109,15 @@ class PairYukawaKokkos : public PairYukawa {
friend
class
PairComputeFunctor
<
PairYukawaKokkos
,
HALFTHREAD
,
false
>
;
friend
class
PairComputeFunctor
<
PairYukawaKokkos
,
HALFTHREAD
,
false
>
;
friend
class
PairComputeFunctor
<
PairYukawaKokkos
,
N2
,
false
>
;
friend
class
PairComputeFunctor
<
PairYukawaKokkos
,
N2
,
false
>
;
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
FULL
,
void
>
(
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
FULL
,
void
>
(
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
HALF
,
void
>
(
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
HALF
,
void
>
(
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
HALFTHREAD
,
void
>
(
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
HALFTHREAD
,
void
>
(
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
N2
,
void
>
(
friend
EV_FLOAT
pair_compute_neighlist
<
PairYukawaKokkos
,
N2
,
void
>
(
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
friend
EV_FLOAT
pair_compute
<
PairYukawaKokkos
,
void
>
(
friend
EV_FLOAT
pair_compute
<
PairYukawaKokkos
,
void
>
(
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
PairYukawaKokkos
*
,
NeighListKokkos
<
DeviceType
>*
);
friend
void
pair_virial_fdotr_compute
<
PairYukawaKokkos
>
(
PairYukawaKokkos
*
);
friend
void
pair_virial_fdotr_compute
<
PairYukawaKokkos
>
(
PairYukawaKokkos
*
);
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment